summaryrefslogtreecommitdiffstats
path: root/usr/local/www/carp_status.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-08-28 21:22:30 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-08-28 21:22:30 +0000
commit172bd0750ed15d7c491a3f2860fcc26477aa0a9e (patch)
tree33a05282a3d97965210913a97fce643cd11c8e02 /usr/local/www/carp_status.php
parent0919224fbd27505f35b94f4dd8a8070ceac153aa (diff)
downloadpfsense-172bd0750ed15d7c491a3f2860fcc26477aa0a9e.zip
pfsense-172bd0750ed15d7c491a3f2860fcc26477aa0a9e.tar.gz
Make page look OK when no carp interfaces are defined.
Diffstat (limited to 'usr/local/www/carp_status.php')
-rwxr-xr-xusr/local/www/carp_status.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php
index f9bd9ad..e386c19 100755
--- a/usr/local/www/carp_status.php
+++ b/usr/local/www/carp_status.php
@@ -93,14 +93,6 @@ include("head.inc");
foreach($config['virtualip']['vip'] as $carp) {
if ($carp['mode'] == "carp") $carpcount++;
}
- if ($carpcount == 0) {
- echo "</td></tr></table><center><br>Could not locate any defined CARP interfaces.";
- echo "</center>";
-
- include("fend.inc");
- echo "</body></html>";
- exit;
- }
}
?>
@@ -112,6 +104,15 @@ include("head.inc");
<td class="listhdrr"><b><center>Status</center></b></td>
</tr>
<?php
+ if ($carpcount == 0) {
+ echo "</td></tr></table></table></div><center><br>Could not locate any defined CARP interfaces.";
+ echo "</center>";
+
+ include("fend.inc");
+ echo "</body></html>";
+ exit;
+ }
+
if(is_array($config['virtualip']['vip'])) {
$carpint=0;
foreach($config['virtualip']['vip'] as $carp) {
OpenPOWER on IntegriCloud