From: Stefan Schantl Date: Mon, 17 May 2021 21:08:01 +0000 (+0200) Subject: services.cgi: Use new system methods X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c60275423feceef517b6110cdecabda338e2773b;p=people%2Fstevee%2Fipfire-2.x.git services.cgi: Use new system methods Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index 38b89ef1e6..ee4ac185a2 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2005-2010 IPFire Team # +# Copyright (C) 2005-2021 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -221,13 +221,13 @@ sub isautorun{ my $cmd = $_[0]; my $col = $_[1]; my $status = ""; - my $init = `find /etc/rc.d/rc3.d/S??${cmd} 2>/dev/null`; - chomp ($init); + my @init = &General::system_output("find", "/etc/rc.d/rc3.d/S??${cmd}"); + my $init = chomp(@init[0]); if ($init ne ''){ $status = "$Lang::tr{"; } - $init = `find /etc/rc.d/rc3.d/off/S??${cmd} 2>/dev/null`; - chomp ($init); + @init = &General::system_output("find", "/etc/rc.d/rc3.d/off/S??${cmd}"); + my $init = chomp (@init[0]); if ($init ne ''){ $status = "$Lang::tr{"; } @@ -297,7 +297,8 @@ sub isrunningaddon{ my $exename; my @memory; - my $testcmd = `/usr/local/bin/addonctrl $_ status 2>/dev/null`; + my @testcmd = &General::system_output("/usr/local/bin/addonctrl", "$_", "status"); + my $testcmd = @testcmd[0]; if ( $testcmd =~ /is\ running/ && $testcmd !~ /is\ not\ running/){ $status = "$Lang::tr{'running'}";