summaryrefslogtreecommitdiff
path: root/scripts/keepalived/vyatta-vrrp-state.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/keepalived/vyatta-vrrp-state.pl')
-rwxr-xr-xscripts/keepalived/vyatta-vrrp-state.pl9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/keepalived/vyatta-vrrp-state.pl b/scripts/keepalived/vyatta-vrrp-state.pl
index 8b813529..9e11b649 100755
--- a/scripts/keepalived/vyatta-vrrp-state.pl
+++ b/scripts/keepalived/vyatta-vrrp-state.pl
@@ -55,7 +55,8 @@ sub vrrp_state_log {
my $vrrp_state = $ARGV[0];
my $vrrp_intf = $ARGV[1];
my $vrrp_group = $ARGV[2];
-my $vrrp_vip = $ARGV[3];
+my $vrrp_transitionscript = $ARGV[3];
+my $vrrp_vip = $ARGV[4];
my $sfile = VyattaKeepalived::get_state_file($vrrp_intf, $vrrp_group);
my ($old_time, $old_intf, $old_group, $old_state, $old_ltime) =
@@ -77,6 +78,12 @@ if ($vrrp_state eq "backup") {
system("rm -f $mfile");
}
+
+if (!($vrrp_transitionscript eq "null")){
+ exec("$vrrp_transitionscript");
+}
+
+
exit 0;
# end of file