summaryrefslogtreecommitdiffstats
path: root/usr/local/www/carp_status.php
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2014-03-21 16:16:43 +0100
committerPiBa-NL <pba_2k3@yahoo.com>2014-03-30 00:09:30 +0100
commit783f1ee2107bc8746542c9c412596b8830488000 (patch)
tree0d8a93d4cd4f599af7594a07271dcacaaea9ba28 /usr/local/www/carp_status.php
parenta6bb4e06551224137312b60dfc7db5c06581d35f (diff)
downloadpfsense-783f1ee2107bc8746542c9c412596b8830488000.zip
pfsense-783f1ee2107bc8746542c9c412596b8830488000.tar.gz
carp, provide a way to 'permanently' set carp to 'maintenance mode' (advskew 254) persisting a reboot
Option to set CARP interfaces to 'maintenance mode', persisting through a reboot so the primary machines stays as backup/inactive. This is required when there are some problems (possibly with the hardware) and the primary machine needs to be booted and checked again before becoming 'master'. Currently it will take back the master state during reboot even though there might still be problems or some re-configuring to do. p.s. it is for some reason not possible to reset advskew back to '0'.. should that number be removed as an option, and use 1 as a minimal value ?
Diffstat (limited to 'usr/local/www/carp_status.php')
-rw-r--r--usr/local/www/carp_status.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php
index b6ce914..26dbc5c 100644
--- a/usr/local/www/carp_status.php
+++ b/usr/local/www/carp_status.php
@@ -39,6 +39,7 @@
*/
require_once("guiconfig.inc");
+require_once("globals.inc");
function gentitle_pkg($pgname) {
global $config;
@@ -50,6 +51,9 @@ unset($carp_interface_count_cache);
unset($interface_ip_arr_cache);
$status = get_carp_status();
+if($_POST['carp_maintenancemode'] <> "") {
+ interfaces_carp_set_maintenancemode(!isset($config["virtualip_carp_maintenancemode"]));
+}
if($_POST['disablecarp'] <> "") {
if($status == true) {
mwexec("/sbin/sysctl net.inet.carp.allow=0");
@@ -116,7 +120,12 @@ include("head.inc");
echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"" . gettext("Enable Carp") . "\">";
} else {
$carp_enabled = true;
- echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"" . gettext("Disable Carp") . "\">";
+ echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"" . gettext("Disable Carptemporarily") . "\">";
+ }
+ if(isset($config["virtualip_carp_maintenancemode"])) {
+ echo "<input type=\"submit\" name=\"carp_maintenancemode\" id=\"carp_maintenancemode\" value=\"" . gettext("Leave Carp maintenance mode now and on reboot") . "\">";
+ } else {
+ echo "<input type=\"submit\" name=\"carp_maintenancemode\" id=\"carp_maintenancemode\" value=\"" . gettext("Enter Carp maintenance mode now and on reboot") . "\">";
}
}
?>
OpenPOWER on IntegriCloud