On Sun, Sep 09, 2007 at 12:37:17PM +0100, Zoe Parsons wrote: > [EMAIL PROTECTED]:~# logtail2 -t /var/log/syslog > Cannot get /var/log/syslog.1.gz mtime: No such file or directory
Does the following patch help? diff -urN logcheck-1.2.61/src/detectrotate/10-savelog.dtr logcheck/src/detectrotate/10-savelog.dtr --- logcheck-1.2.61/src/detectrotate/10-savelog.dtr 2007-08-23 13:44:27.000000000 +0200 +++ logcheck/src/detectrotate/10-savelog.dtr 2007-09-09 16:56:59.000000000 +0200 @@ -3,7 +3,7 @@ sub { my ($filename) = @_; my $rotated_filename=""; - if (-e "$filename.0" && (mtime("$filename.0") > mtime("$filename.1.gz")) ) { + if (-e "$filename.0" && -e "$filename.1.gz" && (mtime("$filename.0") > mtime("$filename.1.gz")) ) { # assume the log is rotated by savelog(8) # syslog-ng leaves old files here $rotated_filename="$filename.0"; diff -urN logcheck-1.2.61/src/logtail2 logcheck/src/logtail2 --- logcheck-1.2.61/src/logtail2 2007-08-23 13:44:27.000000000 +0200 +++ logcheck/src/logtail2 2007-09-09 16:58:00.000000000 +0200 @@ -122,7 +122,7 @@ #} else { # print "no rotated file found\n"; #} - if ($rotated_filename && inode($rotated_filename) == $inode) { + if ($rotated_filename && -e "$rotated_filename" && inode($rotated_filename) == $inode) { return $rotated_filename; } else { return ""; Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 3221 2323190 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]