From f6c3d454f99f430bfb538ba2008965a0eab97527 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Sun, 1 Mar 2009 09:22:47 -0800 Subject: Fix 4068: 'show vrrp' last transition times are not updated when a transition occurs on boot. --- lib/Vyatta/Keepalived.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Vyatta/Keepalived.pm b/lib/Vyatta/Keepalived.pm index 325022f6..5267d102 100755 --- a/lib/Vyatta/Keepalived.pm +++ b/lib/Vyatta/Keepalived.pm @@ -38,7 +38,7 @@ my $keepalived_conf = '/etc/keepalived/keepalived.conf'; my $sbin_dir = '/opt/vyatta/sbin'; my $state_transition = "$sbin_dir/vyatta-vrrp-state.pl"; my $keepalived_pid = '/var/run/keepalived_vrrp.pid'; -my $state_dir = '/var/log/vrrpd'; +my $state_dir = '/var/run/vrrpd'; my $vrrp_log = "$state_dir/vrrp.log"; @@ -106,6 +106,7 @@ sub get_state_script { sub get_state_file { my ($vrrp_intf, $vrrp_group) = @_; + system("mkdir $state_dir") if ! -d $state_dir; my $file = "$state_dir/vrrpd_" . "$vrrp_intf" . "_" . "$vrrp_group.state"; return $file; } -- cgit v1.2.3