From 14783e8cab3c96560d42e279c3b28ad27812f91f Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 17 May 2021 19:37:07 +0100 Subject: [PATCH] dhcp.cgi: Use new system methods Signed-off-by: Michael Tremer --- html/cgi-bin/dhcp.cgi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi index dd379dc47c..a2b56ffbb7 100644 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -1329,7 +1329,7 @@ sub buildconf { print FILE "}\n\n"; } - system ('/usr/bin/touch', "${General::swroot}/dhcp/enable_${lc_itf}"); + &General::system('/usr/bin/touch', "${General::swroot}/dhcp/enable_${lc_itf}"); &General::log("DHCP on ${itf}: " . $Lang::tr{'dhcp server enabled'}) } else { unlink "${General::swroot}/dhcp/enable_${lc_itf}"; @@ -1356,9 +1356,9 @@ sub buildconf { } print FILE "include \"${General::swroot}/dhcp/dhcpd.conf.local\";\n"; close FILE; - if ( $dhcpsettings{"ENABLE_GREEN"} eq 'on' || $dhcpsettings{"ENABLE_BLUE"} eq 'on' ) {system '/usr/local/bin/dhcpctrl enable >/dev/null 2>&1';} - else {system '/usr/local/bin/dhcpctrl disable >/dev/null 2>&1';} - system '/usr/local/bin/dhcpctrl restart >/dev/null 2>&1 &'; + if ( $dhcpsettings{"ENABLE_GREEN"} eq 'on' || $dhcpsettings{"ENABLE_BLUE"} eq 'on' ) {&General::system('/usr/local/bin/dhcpctrl', 'enable');} + else {&General::system('/usr/local/bin/dhcpctrl', 'disable');} + &General::system_background('/usr/local/bin/dhcpctrl', 'restart'); } # -- 2.39.5