diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-23 15:24:12 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-23 15:24:12 -0700 |
commit | 1954901f4345cc0e2e0503019ff60eee1e2faaf8 (patch) | |
tree | de0b5ef58843b7aa6fddfb3ccbf409288b5ca33b | |
parent | 71be1922653a66274d02ce79fe4a2ef0a197b5aa (diff) | |
download | vyatta-cfg-quagga-1954901f4345cc0e2e0503019ff60eee1e2faaf8.tar.gz vyatta-cfg-quagga-1954901f4345cc0e2e0503019ff60eee1e2faaf8.zip |
Fix bare file handle warning
-rwxr-xr-x | scripts/system/vyatta_update_logrotate.pl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/system/vyatta_update_logrotate.pl b/scripts/system/vyatta_update_logrotate.pl index abc4a25a..d7649496 100755 --- a/scripts/system/vyatta_update_logrotate.pl +++ b/scripts/system/vyatta_update_logrotate.pl @@ -25,9 +25,10 @@ if (!($files =~ m/^\d+$/) || !($size =~ m/^\d+$/)) { # (the detection mechanism in XORP doesn't work anyway) unlink $log_conf; -open(OUT, ">>$log_conf") or exit 3; +open my $out, '>>', $log_conf + or exit 3; if ($set == 1) { - print OUT <<EOF; + print $out <<EOF; $log_file { missingok notifempty @@ -39,7 +40,7 @@ $log_file { } EOF } -close OUT; +close $out; sleep 1; if (system("/usr/sbin/invoke-rc.d sysklogd restart")) { |