File logwatch-make_save_work.patch of Package logwatch.import5290

Index: scripts/logwatch.pl
===================================================================
--- scripts/logwatch.pl.orig	2007-05-20 02:24:20.000000000 +0200
+++ scripts/logwatch.pl	2009-12-01 16:12:38.368978630 +0100
@@ -1005,10 +1005,10 @@ sub initprint {
    $OStitle = $OSname;
    $OStitle = "Solaris" if ($OSname eq "SunOS" && $release >= 2);
 
-   if ($Config{'print'} eq 1) {
-      *OUTFILE = *STDOUT;
-   } elsif ($Config{'save'} ne "") {
+   if ($Config{'save'} ne "") {
       open(OUTFILE,">>" . $Config{'save'}) or die "Can't open output file: $Config{'save'} $!\n";
+   } elsif ($Config{'print'} eq 1) {
+      *OUTFILE = *STDOUT;
    } else {
       if (($Config{'multiemail'} eq 1) || ($emailopen eq "")) {
          #Use mailer = in logwatch.conf to set options. Default should be "sendmail -t"
openSUSE Build Service is sponsored by