mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-18 23:12:59 +02:00
dhcp.cgi: Use new system methods
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -1330,7 +1330,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}";
|
||||
@@ -1357,9 +1357,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');
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user