Commit 838f687a authored by José Luis  Gutiérrez's avatar José Luis Gutiérrez Committed by Alessandro Rubini

www: adding empty option to network configuration for eth0

network.php now supports no info from dotconfig, displayed as "DHCP". In
addition, after any change the WRS does not reboot and a message says
that reboot is necessary to perform changes.
parent c76dd524
......@@ -356,8 +356,10 @@ function wrs_interface_setup(){
return "dhcponly";
else if (!empty($_SESSION["KCONFIG"]["CONFIG_ETH0_DHCP_ONCE"]))
return "dhcponce";
else
else if (!empty($_SESSION["KCONFIG"]["CONFIG_ETH0_STATIC"]))
return "static";
else
return "dhcponly";
}
/*
* It checks whether the filesystem is writable or not.
......
......@@ -79,8 +79,6 @@
save_kconfig();
apply_kconfig();
wrs_reboot();
//shell_exec("/etc/init.d/network restart > /dev/null 2>&1 &"); /* restart network */
$formatID = "alternatecolor";
$class = "altrowstable firstcol";
......@@ -91,7 +89,7 @@
print_info($section, $subsection, $formatID, $class, $infoname, $format);
echo '<br><center>"DHCP Only" is now set for eth0<br>Rebooting network service...</center>';
echo '<br><center>"DHCP Only" is now set for eth0<br>Changes will take place after <a href="reboot.php">reboot</a>.</center>';
}
if ((!empty($_POST["networkgroup"])) && (!strcmp(htmlspecialchars($_POST["networkgroup"]),"DHCPONCE"))){
......@@ -163,7 +161,7 @@
delete_from_kconfig("CONFIG_ETH0_DHCP=");
delete_from_kconfig("CONFIG_ETH0_STATIC=");
echo '<br><center>"DHCP Once" is now set for eth0<br>Rebooting network service...</center>';
echo '<br><center>"DHCP Once" is now set for eth0<br>Changes will take place after <a href="reboot.php">reboot</a>.</center>';
}else{
$_SESSION["KCONFIG"]["CONFIG_ETH0_STATIC"]="y";
......@@ -184,13 +182,12 @@
delete_from_kconfig("CONFIG_ETH0_DHCP_ONCE=");
delete_from_kconfig("CONFIG_ETH0_DHCP=");
echo '<br><center>"Static Only" is now set for eth0<br>Rebooting network service...</center>';
echo '<br><center>"Static Only" is now set for eth0<br>Changes will take place after <a href="reboot.php">reboot</a>.</center>';
}
save_kconfig();
apply_kconfig();
//shell_exec("/etc/init.d/network restart > /dev/null 2>&1 &"); /* restart network */
wrs_reboot();
}
?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment