From: Stefan Schantl Date: Mon, 17 May 2021 20:53:23 +0000 (+0200) Subject: memory.cgi: Use perl mechanism to check if the rrd file for the swap exists. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4353c579248b3016740252009b4ed15a4c6f8fe3;p=people%2Fms%2Fipfire-2.x.git memory.cgi: Use perl mechanism to check if the rrd file for the swap exists. Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/memory.cgi b/html/cgi-bin/memory.cgi index 89fa7d14a3..dea7e36685 100644 --- a/html/cgi-bin/memory.cgi +++ b/html/cgi-bin/memory.cgi @@ -56,7 +56,7 @@ if ( $querry[0] =~ "memory"){ &Graphs::makegraphbox("memory.cgi","memory","day"); &Header::closebox(); - if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/swap 2>/dev/null` ) { + if (-f $mainsettings{'RRDLOG'}/collectd/localhost/swap) { &Header::openbox('100%', 'center', "Swap $Lang::tr{'graph'}"); &Graphs::makegraphbox("memory.cgi","swap","day"); &Header::closebox();