aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-01-18 00:32:52 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-01-18 00:32:52 +0000
commit11091cb1b246529541930679d41e89fd02ba00f5 (patch)
treeb9683248a2c86925afbcc29e1f8c33660c37b66b
parent3d5c8503db8cd43cc76ca57781c01e7d9b0d47fd (diff)
downloadpfsense-packages-11091cb1b246529541930679d41e89fd02ba00f5.tar.gz
pfsense-packages-11091cb1b246529541930679d41e89fd02ba00f5.tar.bz2
pfsense-packages-11091cb1b246529541930679d41e89fd02ba00f5.zip
Allow the password to be optional
-rw-r--r--packages/carp.xml5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/carp.xml b/packages/carp.xml
index 2f60836a..308ce2b9 100644
--- a/packages/carp.xml
+++ b/packages/carp.xml
@@ -221,7 +221,10 @@
*/
system("/sbin/ifconfig carp" . $carp_instances_counter . " create");
$broadcast_address = gen_subnet_max($carp['ipaddress'], $carp['netmask']);
- $carp_command = "/sbin/ifconfig carp" . $carp_instances_counter . " " . $carp['ipaddress'] . " " . $carp['netmask'] . " broadcast " . $broadcast_address . " vhid " . $carp['vhid'] . $carp['advskew '] . " pass " . $carp['password'];
+ if($carp['password'] != "") {
+ $password = " pass " . $carp['password'];
+ }
+ $carp_command = "/sbin/ifconfig carp" . $carp_instances_counter . " " . $carp['ipaddress'] . " " . $carp['netmask'] . " broadcast " . $broadcast_address . " vhid " . $carp['vhid'] . $carp['advskew '] . $password;
if($carp['balancing'] == "true") $using_arp_balance = 1;
if($carp['preempt'] == "true") $using_preempt = 1;
fwrite($fout, $carp_command . "\n");