Commit feb9e722 authored by Franco Fichtner's avatar Franco Fichtner

backup: do not redirect on interface mismatches

The default is to reboot anyway.  For everybody importing a backup
that has interface mismatches this means the backup did not come
from the same system, so it must be adapted on the console instead.

Caused by:	Omitted /var/run boot up purge
parent de8d9396
......@@ -442,20 +442,6 @@ if ($_POST) {
}
}
setup_serial_port();
if(is_interface_mismatch() == true) {
touch("/var/run/interface_mismatch_reboot_needed");
clear_subsystem_dirty("restore");
convert_config();
header("Location: interfaces_assign.php");
exit;
}
if (is_interface_vlan_mismatch() == true) {
touch("/var/run/interface_mismatch_reboot_needed");
clear_subsystem_dirty("restore");
convert_config();
header("Location: interfaces_assign.php");
exit;
}
} else {
$input_errors[] = gettext("The configuration could not be restored.");
}
......
......@@ -221,18 +221,14 @@ if (isset($_POST['add_x']) && isset($_POST['if_add'])) {
}
} else if (isset($_POST['apply'])) {
if (file_exists("/var/run/interface_mismatch_reboot_needed")) {
system_reboot();
$rebootingnow = true;
} else {
write_config();
$retval = filter_configure();
$savemsg = get_std_save_message($retval);
if (stristr($retval, "error") <> true)
if (stristr($retval, "error") != true) {
$savemsg = get_std_save_message($retval);
else
} else {
$savemsg = $retval;
}
......@@ -418,15 +414,6 @@ foreach ($portlist as $portname => $portinfo) {
include("head.inc");
if(file_exists("/var/run/interface_mismatch_reboot_needed"))
if ($_POST) {
if($rebootingnow)
$savemsg = gettext("The system is now rebooting. Please wait.");
else
$savemsg = gettext("Reboot is needed. Please apply the settings in order to reboot.");
} else {
$savemsg = gettext("Interface mismatch detected. Please resolve the mismatch and click 'Apply changes'. The firewall will reboot afterwards.");
}
?>
<body>
......
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