summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-06-11 15:52:02 -0700
committerStig Thormodsrud <stig@vyatta.com>2008-06-11 15:52:02 -0700
commite4b498f815db5b52b58b84d34c143520cdd19488 (patch)
treedeb7d2d3d711897a2ea9c743713197fa86b30a04 /scripts
parentb4b2864a93b38e3e900164564f262b0375fcec24 (diff)
downloadvyatta-cfg-quagga-e4b498f815db5b52b58b84d34c143520cdd19488.tar.gz
vyatta-cfg-quagga-e4b498f815db5b52b58b84d34c143520cdd19488.zip
Fix 1818: Add disable option to vrrp.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/keepalived/vyatta-keepalived.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/keepalived/vyatta-keepalived.pl b/scripts/keepalived/vyatta-keepalived.pl
index e40c737a..ada5e367 100755
--- a/scripts/keepalived/vyatta-keepalived.pl
+++ b/scripts/keepalived/vyatta-keepalived.pl
@@ -50,6 +50,12 @@ sub keepalived_get_values {
foreach my $group (@groups) {
my $vrrp_instance = "vyatta-$intf-$group";
$config->setLevel("$path vrrp vrrp-group $group");
+ if ($config->exists("disable")) {
+ VyattaKeepalived::vrrp_log("$vrrp_instance disabled - skipping");
+ my $state_file = VyattaKeepalived::get_state_file($intf, $group);
+ system("rm -f $state_file");
+ next;
+ }
my @vips = $config->returnValues("virtual-address");
my $num_vips = scalar(@vips);
if ($num_vips == 0) {