summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Keepalived.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Vyatta/Keepalived.pm')
-rwxr-xr-xlib/Vyatta/Keepalived.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Vyatta/Keepalived.pm b/lib/Vyatta/Keepalived.pm
index 26a0a38..437b055 100755
--- a/lib/Vyatta/Keepalived.pm
+++ b/lib/Vyatta/Keepalived.pm
@@ -22,6 +22,9 @@
# **** End License ****
#
package Vyatta::Keepalived;
+use strict;
+use warnings;
+
our @EXPORT = qw(get_conf_file get_state_script get_state_file
vrrp_log vrrp_get_init_state get_changes_file
start_daemon restart_daemon stop_daemon
@@ -32,9 +35,6 @@ use Vyatta::Config;
use Vyatta::Interface;
use POSIX;
-use strict;
-use warnings;
-
my $daemon = '/usr/sbin/keepalived';
my $keepalived_conf = '/etc/keepalived/keepalived.conf';
my $sbin_dir = '/opt/vyatta/sbin';
@@ -276,9 +276,8 @@ sub vrrp_state_parse {
chomp $line;
my ($start_time, $intf, $group, $state, $ltime) = split(' ', $line);
return ($start_time, $intf, $group, $state, $ltime);
- } else {
- return undef;
- }
+ }
+ # else return undefined
}
sub vrrp_get_init_state {