diff options
author | jim-p <jimp@pfsense.org> | 2014-04-15 13:57:40 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2014-04-15 13:57:40 -0400 |
commit | 8a84b3abbafd92c69bf1dc2750d24bf34b58648f (patch) | |
tree | ad3e34166e5867229a63302e6b1230aa3e42fe22 /usr/local/www/carp_status.php | |
parent | f7b0cd435588e4d96ee54da77837f0e511ba449c (diff) | |
download | pfsense-8a84b3abbafd92c69bf1dc2750d24bf34b58648f.zip pfsense-8a84b3abbafd92c69bf1dc2750d24bf34b58648f.tar.gz |
Key off net.inet.carp.demotion and display a warning to the user if the system has self-demoted its CARP status.
Diffstat (limited to 'usr/local/www/carp_status.php')
-rw-r--r-- | usr/local/www/carp_status.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php index f050452..769f76e 100644 --- a/usr/local/www/carp_status.php +++ b/usr/local/www/carp_status.php @@ -89,6 +89,8 @@ if($_POST['disablecarp'] <> "") { $status = get_carp_status(); +$carp_detected_problems = (array_pop(get_sysctl("net.inet.carp.demotion")) > 0); + $pgtitle = array(gettext("Status"),gettext("CARP")); $shortcut_section = "carp"; include("head.inc"); @@ -100,6 +102,9 @@ include("head.inc"); <form action="carp_status.php" method="post"> <?php if ($savemsg) print_info_box($savemsg); ?> +<?PHP if ($carp_detected_problems) print_info_box(gettext("CARP has detected a problem and this unit has been demoted to BACKUP status.") . "<br />" . gettext("Check link status on all interfaces with configured CARP VIPs.")); ?> + + <div id="mainlevel"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> @@ -144,9 +149,8 @@ include("head.inc"); include("fend.inc"); echo "</body></html>"; - exit; + return; } - if(is_array($config['virtualip']['vip'])) { foreach($config['virtualip']['vip'] as $carp) { if ($carp['mode'] != "carp") |