summaryrefslogtreecommitdiff
path: root/scripts/system
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-23 15:24:12 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-23 15:24:12 -0700
commit1954901f4345cc0e2e0503019ff60eee1e2faaf8 (patch)
treede0b5ef58843b7aa6fddfb3ccbf409288b5ca33b /scripts/system
parent71be1922653a66274d02ce79fe4a2ef0a197b5aa (diff)
downloadvyatta-cfg-system-1954901f4345cc0e2e0503019ff60eee1e2faaf8.tar.gz
vyatta-cfg-system-1954901f4345cc0e2e0503019ff60eee1e2faaf8.zip
Fix bare file handle warning
Diffstat (limited to 'scripts/system')
-rwxr-xr-xscripts/system/vyatta_update_logrotate.pl7
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")) {