diff options
Diffstat (limited to 'scripts')
-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")) { |