diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-25 17:42:48 +1100 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-25 17:42:48 +1100 |
commit | 52a35343564f25c29d8c4b1255712544f4957251 (patch) | |
tree | 8739e1a99820dfdd88a4b00c368104aaa9cb4dff /scripts/keepalived | |
parent | 69e604a82027bb6461204106edd11be61767aa2a (diff) | |
download | vyatta-cfg-system-52a35343564f25c29d8c4b1255712544f4957251.tar.gz vyatta-cfg-system-52a35343564f25c29d8c4b1255712544f4957251.zip |
Replace bare word file handle
Use local variable.
Diffstat (limited to 'scripts/keepalived')
-rw-r--r-- | scripts/keepalived/vyatta-clear-vrrp.pl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/keepalived/vyatta-clear-vrrp.pl b/scripts/keepalived/vyatta-clear-vrrp.pl index a44b0305..a22b4f14 100644 --- a/scripts/keepalived/vyatta-clear-vrrp.pl +++ b/scripts/keepalived/vyatta-clear-vrrp.pl @@ -257,9 +257,10 @@ if ($action eq "clear_master") { # should add a file lock local($/, *FILE); # slurp mode - open FILE, "<", $conf_file or die "Couldn't open $conf_file\n"; - my $conf = <FILE>; - close FILE; + + open my $f, '<', $conf_file or die "Couldn't open $conf_file\n"; + my $conf = <$f>; + close $f; my ($new_conf, $match_instance) = vrrp_extract_instance($conf, $instance); if ($match_instance !~ /nopreempt/) { |