diff options
author | rbalocca <rbalocca@fugazi.vyatta.com> | 2007-12-19 15:19:37 -0800 |
---|---|---|
committer | rbalocca <rbalocca@fugazi.vyatta.com> | 2007-12-19 15:19:37 -0800 |
commit | a27a8f7b5501ef9fa1c8e3be0fed4430d0515271 (patch) | |
tree | 1ae0af03eaa4214fdcc69a57e20c2598f44e6519 /scripts/keepalived/VyattaKeepalived.pm | |
parent | eefd3f1d5836f383f4d627f02c794d870f23bb94 (diff) | |
parent | 793d580050edada4b4468b0d8044615ff5fc15aa (diff) | |
download | vyatta-cfg-system-a27a8f7b5501ef9fa1c8e3be0fed4430d0515271.tar.gz vyatta-cfg-system-a27a8f7b5501ef9fa1c8e3be0fed4430d0515271.zip |
Merge branch 'master' into glendale
Diffstat (limited to 'scripts/keepalived/VyattaKeepalived.pm')
-rwxr-xr-x | scripts/keepalived/VyattaKeepalived.pm | 9 |
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) { |