From 11091cb1b246529541930679d41e89fd02ba00f5 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 18 Jan 2005 00:32:52 +0000 Subject: Allow the password to be optional --- packages/carp.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"); -- cgit v1.2.3