summaryrefslogtreecommitdiff
path: root/scripts/keepalived/VyattaKeepalived.pm
diff options
context:
space:
mode:
authorrbalocca <rbalocca@fugazi.vyatta.com>2007-12-19 15:19:37 -0800
committerrbalocca <rbalocca@fugazi.vyatta.com>2007-12-19 15:19:37 -0800
commita27a8f7b5501ef9fa1c8e3be0fed4430d0515271 (patch)
tree1ae0af03eaa4214fdcc69a57e20c2598f44e6519 /scripts/keepalived/VyattaKeepalived.pm
parenteefd3f1d5836f383f4d627f02c794d870f23bb94 (diff)
parent793d580050edada4b4468b0d8044615ff5fc15aa (diff)
downloadvyatta-cfg-system-a27a8f7b5501ef9fa1c8e3be0fed4430d0515271.tar.gz
vyatta-cfg-system-a27a8f7b5501ef9fa1c8e3be0fed4430d0515271.zip
Merge branch 'master' into glendale
Diffstat (limited to 'scripts/keepalived/VyattaKeepalived.pm')
-rwxr-xr-xscripts/keepalived/VyattaKeepalived.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/keepalived/VyattaKeepalived.pm b/scripts/keepalived/VyattaKeepalived.pm
index e0e84af3..13512b42 100755
--- a/scripts/keepalived/VyattaKeepalived.pm
+++ b/scripts/keepalived/VyattaKeepalived.pm
@@ -115,11 +115,16 @@ sub get_master_file {
}
sub get_state_files {
- my $intf = shift;
+ my ($intf, $group) = @_;
# todo: fix sorting for ethX > 9
my @state_files;
- open(my $LS, "ls $state_dir |grep '^vrrpd_$intf.*\.state\$' | sort |");
+ my $LS;
+ if ($group eq "all") {
+ open($LS,"ls $state_dir |grep '^vrrpd_$intf.*\.state\$' | sort |");
+ } else {
+ open($LS,"ls $state_dir |grep '^vrrpd_$intf.\_$group\.state\$' | sort |");
+ }
@state_files = <$LS>;
close($LS);
foreach my $i (0 .. $#state_files) {