From 23be6f1bc1f2915d4a833604cc536ee856cfeaec Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 23 Apr 2007 23:40:01 +0000 Subject: When restoring a configuration via the webConfigurator detect that a interface mismatch has occured and redirect the user to the assign interface screen. Once the assign interface Save button has been pressed go ahead and reboot. This might just prevent someone from throwing a fit since they do not have console access. --- usr/local/www/diag_backup.php | 5 +++++ usr/local/www/interfaces_assign.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php index 2f39422..d881358 100755 --- a/usr/local/www/diag_backup.php +++ b/usr/local/www/diag_backup.php @@ -184,6 +184,11 @@ if ($_POST) { $reboot_needed = true; } setup_serial_port(); + if(is_interface_mismatch() == true) { + touch("/var/run/interface_mismatch_reboot_needed"); + $reboot_needed = false; + header("Location: interfaces_assign.php"); + } } else { $input_errors[] = "The configuration could not be restored."; } diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index 7999fa3..2379ca2 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -195,6 +195,9 @@ if ($_GET['act'] == "add") { $pgtitle = "Interfaces: Assign"; include("head.inc"); +if(file_exists("/var/run/interface_mismatch_reboot_needed")) + $savemsg = "Interface mismatch deteceted. Please resolved the mismatch and click Save. The firewall will reboot afterwards."; + ?> @@ -287,6 +290,8 @@ include("head.inc"); if ($_POST) { if (!$input_errors) touch("/tmp/reload_interfaces"); + if(file_exists("/var/run/interface_mismatch_reboot_needed")) + exec("/etc/rc.reboot"); } ?> \ No newline at end of file -- cgit v1.1