From: Stefan Schantl Date: Thu, 20 May 2021 17:43:10 +0000 (+0200) Subject: fireinfo.cgi: Use new system methods X-Git-Tag: v2.25-core158~33^2~10^2~10 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=2ccb63bce8b63efe3e7b1ce72dff115692c3becd fireinfo.cgi: Use new system methods Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/fireinfo.cgi b/html/cgi-bin/fireinfo.cgi index c4baa61702..99952be2eb 100644 --- a/html/cgi-bin/fireinfo.cgi +++ b/html/cgi-bin/fireinfo.cgi @@ -49,7 +49,11 @@ if ( -e "$configfile" ) { if ("$fireinfosettings{'ACTION'}" eq "trigger") { if ($fireinfosettings{'ENABLE_FIREINFO'} eq 'off') { &General::log($Lang::tr{'fireinfo is enabled'}); - &General::system('/usr/bin/touch', $configfile); + + # Write empty configfile. + open(FILE, ">$configfile"); + close(FILE); + $fireinfosettings{'ENABLE_FIREINFO'} = 'on'; } else { &General::log($Lang::tr{'fireinfo is disabled'}); @@ -84,9 +88,13 @@ if ($errormessage) { &Header::closebox(); } -my $ipfire_version = `cat /etc/system-release`; +# Get IPFire version string. +open(FILE, "/etc/system-release"); +my $ipfire_version = ; +close(FILE); + my $pakfire_version = &Pakfire::make_version(); -my $kernel_version = `uname -a`; +my $kernel_version = &General::system_output("uname", "-a"); &Header::openbox('100%', 'left', $Lang::tr{'fireinfo system version'}); print <; +close(FILE); +chomp($profile); print "
\n"; # Read profile ID from file -my $profile_id = `cat /var/ipfire/fireinfo/public_id`; +open(FILE, "/var/ipfire/fireinfo/public_id"); +my $profile_id = ; +close(FILE); chomp($profile_id); &Header::openbox('100%', 'left', $Lang::tr{'fireinfo settings'});