Commit b5505cb4 authored by Franco Fichtner's avatar Franco Fichtner

rc: allow dhcp for !wan

parent ed90ebd5
...@@ -248,9 +248,8 @@ function console_configure_ip_address($version) ...@@ -248,9 +248,8 @@ function console_configure_ip_address($version)
$upperifname = strtoupper($interface); $upperifname = strtoupper($interface);
if ($interface == 'wan') {
if (console_prompt_for_yn(sprintf('Configure %s address %s interface via %s?', $label_IPvX, $upperifname, $label_DHCP), 'y')) { if (console_prompt_for_yn(sprintf('Configure %s address %s interface via %s?', $label_IPvX, $upperifname, $label_DHCP), 'y')) {
$ifppp = console_get_interface_from_ppp(get_real_interface('wan')); $ifppp = console_get_interface_from_ppp(get_real_interface($interface));
if (!empty($ifppp)) { if (!empty($ifppp)) {
$ifaceassigned = $ifppp; $ifaceassigned = $ifppp;
} }
...@@ -259,9 +258,8 @@ function console_configure_ip_address($version) ...@@ -259,9 +258,8 @@ function console_configure_ip_address($version)
$isintdhcp = true; $isintdhcp = true;
$restart_dhcpd = true; $restart_dhcpd = true;
} }
}
if ($isintdhcp == false or $interface <> "wan") { if (!$isintdhcp) {
while (true) { while (true) {
do { do {
echo "\n" . sprintf( echo "\n" . sprintf(
...@@ -465,10 +463,12 @@ if (!$config['interfaces']['lan']) { ...@@ -465,10 +463,12 @@ if (!$config['interfaces']['lan']) {
$restart_dhcpd = true; $restart_dhcpd = true;
} }
echo "\n";
write_config(sprintf('%s configuration from console menu', $interface)); write_config(sprintf('%s configuration from console menu', $interface));
interface_bring_down($interface); interface_bring_down($interface);
interface_configure($interface, true); interface_configure($interface, true, false, true);
filter_configure_sync(true); filter_configure_sync(true);
if ($restart_dhcpd) { if ($restart_dhcpd) {
...@@ -479,6 +479,8 @@ if ($restart_webgui) { ...@@ -479,6 +479,8 @@ if ($restart_webgui) {
webgui_configure_do(true); webgui_configure_do(true);
} }
echo "\n";
$upperifname = strtoupper($interface); $upperifname = strtoupper($interface);
if ($intip != '') { if ($intip != '') {
......
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