summaryrefslogtreecommitdiff
path: root/lib/Vyatta
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@io.vyatta.com>2009-03-01 09:22:47 -0800
committerStig Thormodsrud <stig@io.vyatta.com>2009-03-01 09:22:47 -0800
commitf6c3d454f99f430bfb538ba2008965a0eab97527 (patch)
treeed54faa4cdbf3437848b9a85c1e4bbaab2316182 /lib/Vyatta
parent62370cabf2dd559e6b5220a44e546d294de3b2a9 (diff)
downloadvyatta-cfg-system-f6c3d454f99f430bfb538ba2008965a0eab97527.tar.gz
vyatta-cfg-system-f6c3d454f99f430bfb538ba2008965a0eab97527.zip
Fix 4068: 'show vrrp' last transition times are not updated when a transition occurs on boot.
Diffstat (limited to 'lib/Vyatta')
-rwxr-xr-xlib/Vyatta/Keepalived.pm3
1 files changed, 2 insertions, 1 deletions
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;
}