]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/dhcp.cgi
Am Pakfire weitergearbeitet.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / dhcp.cgi
index 87134a4690ed2674ee616829ae86312a0ffcb4d9..e24f7336d8f00b004de074cfd468c4e1aed49887 100644 (file)
@@ -49,7 +49,8 @@ my @nosaved=();
 our $OptionTypes = 'boolean|((un)?signed )?integer (8|16|32)|ip-address|text|string|encapsulate \w+|array of ip-address';
 
 &Header::showhttpheaders();
-our @ITFs=('GREEN','BLUE');
+our @ITFs=('GREEN');
+if (&Header::blue_used()){push(@ITFs,'BLUE');}
 
 #Settings1 for the first screen box
 foreach my $itf (@ITFs) {
@@ -1199,9 +1200,11 @@ sub buildconf {
            print FILE "} #$itf\n";
 
            system ('/usr/bin/touch', "${General::swroot}/dhcp/enable_${lc_itf}");
+           system ('/usr/local/bin/dhcpctrl enable');
            &General::log("DHCP on ${itf}: " . $Lang::tr{'dhcp server enabled'})
        } else {
            unlink "${General::swroot}/dhcp/enable_${lc_itf}";
+           system ('/usr/local/bin/dhcpctrl disable');
            &General::log("DHCP on ${itf}: " . $Lang::tr{'dhcp server disabled'})
        }
     }
@@ -1224,7 +1227,7 @@ sub buildconf {
        }
     }
     close FILE;
-    system '/usr/local/bin/restartdhcp';
+    system '/usr/local/bin/dhcpctrl restart >/dev/null 2>&1';
 }
 
 #