diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-04-21 18:33:25 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-04-21 18:33:25 +0000 |
commit | 673e063c7b7ece71f24490cf21974937e26c9c9a (patch) | |
tree | 09ded5558bb21862dce9e0137d98c79427a9ab99 /packages/carp_status.php | |
parent | 7e34ac034c3663700063b49ed5d8a5687404510b (diff) | |
download | pfsense-packages-673e063c7b7ece71f24490cf21974937e26c9c9a.tar.gz pfsense-packages-673e063c7b7ece71f24490cf21974937e26c9c9a.tar.bz2 pfsense-packages-673e063c7b7ece71f24490cf21974937e26c9c9a.zip |
Add a disable CARP temporarily option. This addresses Ticket #17
Diffstat (limited to 'packages/carp_status.php')
-rw-r--r-- | packages/carp_status.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/carp_status.php b/packages/carp_status.php index ddf8cb39..6befae65 100644 --- a/packages/carp_status.php +++ b/packages/carp_status.php @@ -35,6 +35,20 @@ function gentitle_pkg($pgname) { return $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pgname; } +$carp_counter=0; +if($_POST['disablecarp'] <> "") { + if($config['installedpackages']['carpsettings']['config'] != "") { + foreach($config['installedpackages']['carpsettings']['config'] as $carp) { + $carp_counter++; + } + } + if($carp_counter > 0) { + for($x=0; $x<$carp_counter; $x++) { + mwexec("/sbin/ifconfig carp{$x} delete"); + } + } +} + ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> @@ -50,6 +64,7 @@ function gentitle_pkg($pgname) { include("fbegin.inc"); ?> <p class="pgtitle"><?=$title?></p> +<form action="carp_status.php" method="post"> <?php if ($savemsg) print_info_box($savemsg); ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> @@ -64,6 +79,10 @@ include("fbegin.inc"); <table width="100%" border="0" cellpadding="6" cellspacing="0"> <tr> + <td colspan="5"><center><input name="disablecarp" value="Disable Carp Temporarily"></td> +</tr> +</tr> +<tr> <td class="listhdrr"><b><center>Carp Interface</center></b></td> <td class="listhdrr"><b><center>Virtual IP</center></b></td> <td class="listhdrr"><b><center>Status</center></b></td> |