Commit 8e4a6e65 authored by Franco Fichtner's avatar Franco Fichtner

config: always print summary and ask for confirmation; #5

parent 08524d5e
...@@ -219,6 +219,7 @@ EOD; ...@@ -219,6 +219,7 @@ EOD;
if ($again) { if ($again) {
continue; continue;
} }
}
echo "\n" . gettext("The interfaces will be assigned as follows:") . "\n\n"; echo "\n" . gettext("The interfaces will be assigned as follows:") . "\n\n";
...@@ -243,9 +244,8 @@ EOD; ...@@ -243,9 +244,8 @@ EOD;
echo $key . PHP_EOL; echo $key . PHP_EOL;
} }
if (in_array($key, array('y', 'Y'))) { if (!in_array($key, array('y', 'Y'))) {
break; return false;
}
} }
if ($lanif) { if ($lanif) {
...@@ -332,6 +332,8 @@ EOD; ...@@ -332,6 +332,8 @@ EOD;
printf(gettext("done.%s"), "\n"); printf(gettext("done.%s"), "\n");
fclose($fp); fclose($fp);
return true;
} }
function autodetect_interface($ifname, $fp) function autodetect_interface($ifname, $fp)
......
...@@ -150,7 +150,7 @@ if (is_interface_mismatch()) { ...@@ -150,7 +150,7 @@ if (is_interface_mismatch()) {
} }
led_assigninterfaces(); led_assigninterfaces();
set_networking_interfaces_ports(); while (!set_networking_interfaces_ports());
led_kitt(); led_kitt();
} }
......
...@@ -37,8 +37,9 @@ require_once("vpn.inc"); ...@@ -37,8 +37,9 @@ require_once("vpn.inc");
require_once("captiveportal.inc"); require_once("captiveportal.inc");
require_once("rrd.inc"); require_once("rrd.inc");
set_networking_interfaces_ports(); if (set_networking_interfaces_ports()) {
echo "Reloading interfaces..."; echo "Reloading interfaces...";
reload_interfaces_sync(); reload_interfaces_sync();
echo "done.\n"; echo "done.\n";
enable_rrd_graphing(); enable_rrd_graphing();
}
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