summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-21 18:44:14 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-21 18:44:14 +0000
commit25b3f772ad12fa9e460d3346373dddaa628c926f (patch)
treef92c08816a977fe52e8ed332d983b534d01c1bee /usr
parent519a599ecc7ddb86b73b725c2b5bc093ed4983e5 (diff)
downloadpfsense-25b3f772ad12fa9e460d3346373dddaa628c926f.zip
pfsense-25b3f772ad12fa9e460d3346373dddaa628c926f.tar.gz
* Tell user when we are rebooting * Issue a shutdown -r now command instead of panicing and potentially corrupting the configuration
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/firewall_virtual_ip.php28
1 files changed, 17 insertions, 11 deletions
diff --git a/usr/local/www/firewall_virtual_ip.php b/usr/local/www/firewall_virtual_ip.php
index 56fab26..47a02e4 100755
--- a/usr/local/www/firewall_virtual_ip.php
+++ b/usr/local/www/firewall_virtual_ip.php
@@ -46,12 +46,14 @@ $a_vip = &$config['virtualip']['vip'];
if ($_GET['act'] == "del") {
if ($a_vip[$_GET['id']]) {
+ $savemsg = "The firewall will reboot due to CARP entry deletion. Please wait...";
/* make sure no inbound NAT mappings reference this entry */
if (is_array($config['nat']['rule'])) {
foreach ($config['nat']['rule'] as $rule) {
if($rule['external-address'] <> "") {
if ($rule['external-address'] == $a_vip[$_GET['id']]['ipaddr']) {
$input_errors[] = "This entry cannot be deleted because it is still referenced by at least one NAT mapping.";
+ $savemsg = "";
break;
}
}
@@ -167,16 +169,20 @@ if ($_POST) {
$pconfig = $_POST;
if ($_POST['apply']) {
- $retval = 0;
-
- config_lock();
- $retval = services_proxyarp_configure();
- /* Bring up any configured CARP interfaces */
- reset_carp();
- $retval |= filter_configure();
- config_unlock();
-
- $savemsg = get_std_save_message($retval);
- unlink_if_exists($d_vipconfdirty_path);
+ if ($_GET['act'] == "del") {
+ mwexec("/sbin/shutdown -r now");
+ } else {
+ $retval = 0;
+
+ config_lock();
+ $retval = services_proxyarp_configure();
+ /* Bring up any configured CARP interfaces */
+ reset_carp();
+ $retval |= filter_configure();
+ config_unlock();
+
+ $savemsg = get_std_save_message($retval);
+ unlink_if_exists($d_vipconfdirty_path);
+ }
}
}
OpenPOWER on IntegriCloud