summaryrefslogtreecommitdiff
path: root/scripts/keepalived/vyatta-keepalived.pl
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-12-12 16:32:14 -0800
committerJohn Southworth <john.southworth@vyatta.com>2011-12-12 16:32:14 -0800
commit8b224e177ef4b2889d3e44940196230a24bde392 (patch)
treee4e4ef18378ba0f7264c0f0a00428a8fbad7e3d8 /scripts/keepalived/vyatta-keepalived.pl
parentb4bae46e47eddfeb2a20c6995257710873a79cf9 (diff)
downloadvyatta-cfg-system-8b224e177ef4b2889d3e44940196230a24bde392.tar.gz
vyatta-cfg-system-8b224e177ef4b2889d3e44940196230a24bde392.zip
Add filtering to transition scripts for vmac interfaces; Make transition script able to detect if the interface is a vmac interface before applying the vmac specific changes
Diffstat (limited to 'scripts/keepalived/vyatta-keepalived.pl')
-rwxr-xr-xscripts/keepalived/vyatta-keepalived.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/keepalived/vyatta-keepalived.pl b/scripts/keepalived/vyatta-keepalived.pl
index f7b6bfe7..5c7676ea 100755
--- a/scripts/keepalived/vyatta-keepalived.pl
+++ b/scripts/keepalived/vyatta-keepalived.pl
@@ -146,8 +146,10 @@ sub keepalived_get_values {
}
my $use_vmac = 0;
+ my $transition_intf = $intf;
if ( $config->exists("interface") ) {
$use_vmac = 1;
+ $transition_intf = "$intf"."v"."$group";
}
my $priority = $config->returnValue("priority");
@@ -300,11 +302,11 @@ sub keepalived_get_values {
}
$output .= "\t\}\n";
$output .= "\tnotify_master \"$state_transition_script master ";
- $output .= "$intf $group $run_master_script @vips\" \n";
+ $output .= "$intf $group $transition_intf $run_master_script @vips\" \n";
$output .= "\tnotify_backup \"$state_transition_script backup ";
- $output .= "$intf $group $run_backup_script @vips\" \n";
+ $output .= "$intf $group $transition_intf $run_backup_script @vips\" \n";
$output .= "\tnotify_fault \"$state_transition_script fault ";
- $output .= "$intf $group $run_fault_script @vips\" \n";
+ $output .= "$intf $group $transition_intf $run_fault_script @vips\" \n";
$output .= "\}\n\n";
}