From: Frank Brehm Date: Wed, 5 Apr 2006 07:24:05 +0000 (+0000) Subject: Kosmetik X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=eb03ad6812919678e8722d6961e16a45c8dc1c59;p=scripts%2Fsolaris.git Kosmetik --- diff --git a/LogRotate.pm b/LogRotate.pm index 1a8be24..10caf5d 100644 --- a/LogRotate.pm +++ b/LogRotate.pm @@ -1268,7 +1268,7 @@ sub rotate($) { print $p . "Schau nach, ob das Firstaction-Script ausgefuehrt werden soll ...\n" if verbose() > 2; unless ( $self->{'c'}{'scripts'}{$firstscript}{'first'} ) { $cmd = join( "\n", @{$self->{'c'}{'scripts'}{$firstscript}{'cmd'}} ) . "\n"; - print $p . "Fuehre Firstaction-Script '$firstscript' aus:\n$cmd" if verbose(); + print $p . "Fuehre Firstaction-Script '$firstscript' aus:\n$cmd"; system $cmd unless $self->{'test'}; } $self->{'c'}{'scripts'}{$firstscript}{'first'} = 1; @@ -1280,7 +1280,7 @@ sub rotate($) { print $p . "Schau nach, ob das Prerotate-Script ausgefuehrt werden soll ...\n" if verbose() > 2; unless ( $self->{'c'}{'scripts'}{$prescript}{'prerun'} and $sharedscripts ) { $cmd = join( "\n", @{$self->{'c'}{'scripts'}{$prescript}{'cmd'}} ) . "\n"; - print $p . "Fuehre Firstaction-Script '$prescript' aus:\n$cmd" if verbose(); + print $p . "Fuehre Firstaction-Script '$prescript' aus:\n$cmd"; system $cmd unless $self->{'test'}; } $self->{'c'}{'scripts'}{$prescript}{'prerun'} = 1; @@ -1313,7 +1313,7 @@ sub rotate($) { if ( $do_script ) { $self->{'c'}{'scripts'}{$postscript}{'donepost'} = 1; $cmd = join( "\n", @{$self->{'c'}{'scripts'}{$postscript}{'cmd'}} ) . "\n"; - print $p . "Fuehre Postrotate-Script '$postscript' aus:\n$cmd" if verbose(); + print $p . "Fuehre Postrotate-Script '$postscript' aus:\n$cmd"; system $cmd unless $self->{'test'}; } } @@ -1329,7 +1329,7 @@ sub rotate($) { if ( $do_script ) { $self->{'c'}{'scripts'}{$lastscript}{'donelast'} = 1; $cmd = join( "\n", @{$self->{'c'}{'scripts'}{$lastscript}{'cmd'}} ) . "\n"; - print $p . "Fuehre Lastaction-Script '$lastscript' aus:\n$cmd" if verbose(); + print $p . "Fuehre Lastaction-Script '$lastscript' aus:\n$cmd"; system $cmd unless $self->{'test'}; } } @@ -1341,7 +1341,7 @@ sub rotate($) { foreach $name ( keys %{$self->{'c'}{'scripts'}} ) { if ( $self->{'c'}{'scripts'}{$name}{'dopost'} and not $self->{'c'}{'scripts'}{$name}{'donepost'} ) { $cmd = join( "\n", @{$self->{'c'}{'scripts'}{$name}{'cmd'}} ) . "\n"; - print $p . "Fuehre Postrotate-Script '$name' aus:\n$cmd" if verbose(); + print $p . "Fuehre Postrotate-Script '$name' aus:\n$cmd"; system $cmd unless $self->{'test'}; } } @@ -1351,7 +1351,7 @@ sub rotate($) { foreach $name ( keys %{$self->{'c'}{'scripts'}} ) { if ( $self->{'c'}{'scripts'}{$name}{'dolast'} and not $self->{'c'}{'scripts'}{$name}{'donelast'} ) { $cmd = join( "\n", @{$self->{'c'}{'scripts'}{$name}{'cmd'}} ) . "\n"; - print $p . "Fuehre Lastaction-Script '$name' aus:\n$cmd" if verbose(); + print $p . "Fuehre Lastaction-Script '$name' aus:\n$cmd"; system $cmd unless $self->{'test'}; } } diff --git a/logrotate.pl b/logrotate.pl index 2f03227..85c9d73 100755 --- a/logrotate.pl +++ b/logrotate.pl @@ -154,7 +154,7 @@ verbose($verbose); $test = 1 if $config_check; unless ( $test ) { - print "\n" . ( "#" x 80 ) . "\n" if $verbose; + print "\n" . ( "#" x 80 ) . "\n"; print "$0 beginnt mit Logrotation um: " . localtime() . "\n\n"; }