diff options
Diffstat (limited to 'scripts/keepalived/vyatta-keepalived.pl')
-rwxr-xr-x | scripts/keepalived/vyatta-keepalived.pl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/keepalived/vyatta-keepalived.pl b/scripts/keepalived/vyatta-keepalived.pl index ada5e367..c41fa7e2 100755 --- a/scripts/keepalived/vyatta-keepalived.pl +++ b/scripts/keepalived/vyatta-keepalived.pl @@ -74,6 +74,10 @@ sub keepalived_get_values { if (!defined $preempt) { $preempt = "true"; } + my $preempt_delay = $config->returnValue("preempt-delay"); + if (defined $preempt_delay and $preempt eq "false") { + print "Warning: preempt delay is ignored when preempt=false\n"; + } my $advert_int = $config->returnValue("advertise-interval"); if (!defined $advert_int) { $advert_int = 1; @@ -121,6 +125,9 @@ sub keepalived_get_values { if ($preempt eq "false") { $output .= "\tnopreempt\n"; } + if (defined $preempt_delay) { + $output .= "\tpreempt_delay $preempt_delay\n"; + } $output .= "\tadvert_int $advert_int\n"; if (defined $auth_type) { $output .= "\tauthentication {\n"; |