diff options
-rw-r--r-- | src/usr/local/www/status_carp.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/usr/local/www/status_carp.php b/src/usr/local/www/status_carp.php index ba0c80a..84fa508 100644 --- a/src/usr/local/www/status_carp.php +++ b/src/usr/local/www/status_carp.php @@ -98,7 +98,7 @@ if ($_POST['disablecarp'] != "") { $carp_detected_problems = get_single_sysctl("net.inet.carp.demotion"); if (!empty($_POST['resetdemotion'])) { - set_single_sysctl("net.inet.carp.demotion", "-{$carp_detected_problems}"); + set_single_sysctl("net.inet.carp.demotion", 0 - $carp_detected_problems); sleep(1); $carp_detected_problems = get_single_sysctl("net.inet.carp.demotion"); } @@ -144,18 +144,17 @@ if ($carpcount == 0) { } // Sadly this needs to be here so that it is inside the form - if ($carp_detected_problems > 0) { + if ($carp_detected_problems != 0) { print_info_box( - gettext("CARP has detected a problem and this unit has been demoted to BACKUP status.") . + gettext("CARP has detected a problem and this unit has a non-zero demotion status.") . "<br/>" . - gettext("Check the link status on all interfaces with configured CARP VIPs.") . - "<br/>" . - sprintf(gettext('Search the %1$sSystem Log%2$s for CARP demotion-related events.'), "<a href=\"/status_logs.php?filtertext=carp%3A+demoted+by\">", "</a>") . + gettext("Check the link status on all interfaces configured with CARP VIPs and ") . + sprintf(gettext('search the %1$sSystem Log%2$s for CARP demotion-related events.'), "<a href=\"/status_logs.php?filtertext=carp%3A+demoted+by\">", "</a>") . "<br/><br/>" . '<button type="submit" class="btn btn-warning" name="resetdemotion" id="resetdemotion" value="' . - gettext("Reset CARP Demotion Status.") . + gettext("Reset CARP Demotion Status") . '"><i class="fa fa-undo icon-embed-btn"></i>' . - gettext("Reset CARP Demotion Status.") . + gettext("Reset CARP Demotion Status") . '</button>', 'danger' ); |