Skip to content
Permalink
Browse files

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
  • Loading branch information
fichtner committed Jul 8, 2015
1 parent de8d939 commit feb9e72289ddea4e2cc34deeb1a82bae0a598300
Showing with 7 additions and 34 deletions.
  1. +0 −14 src/www/diag_backup.php
  2. +7 −20 src/www/interfaces_assign.php
@@ -442,20 +442,6 @@ function spit_out_select_items($name, $showall) {
}
}
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,19 +221,15 @@ interface_sync_wireless_clones($config['interfaces'][$newifname], false);
}

} else if (isset($_POST['apply'])) {
if (file_exists("/var/run/interface_mismatch_reboot_needed")) {
system_reboot();
$rebootingnow = true;
} else {
write_config();
write_config();

$retval = filter_configure();
$savemsg = get_std_save_message($retval);
$retval = filter_configure();
$savemsg = get_std_save_message($retval);

if (stristr($retval, "error") <> true)
$savemsg = get_std_save_message($retval);
else
$savemsg = $retval;
if (stristr($retval, "error") != true) {
$savemsg = get_std_save_message($retval);
} else {
$savemsg = $retval;
}

} else if (isset($_POST['Submit'])) {
@@ -418,15 +414,6 @@ interface_bring_down($id); /* down the interface */

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>

0 comments on commit feb9e72

Please sign in to comment.
You can’t perform that action at this time.