[Logcheck-commits] CVS logcheck/src
CVS User maks-guest
logcheck-devel@lists.alioth.debian.org
Thu, 15 Jul 2004 09:03:03 -0600
Update of /cvsroot/logcheck/logcheck/src
In directory haydn:/tmp/cvs-serv26943/src
Modified Files:
logtail
Log Message:
make shure logtail gets a logfile,
if not exit soon.
--- /cvsroot/logcheck/logcheck/src/logtail 2004/06/10 09:34:05 1.7
+++ /cvsroot/logcheck/logcheck/src/logtail 2004/07/15 15:03:03 1.8
@@ -26,10 +26,13 @@
my %opts = ();
# process args and switches
-
my ($TEST_MODE) = 0;
getopts("f:o:t", \%opts);
-if ($opts{t}) {
+
+if (! $opts{f}) {
+ print "No logfile to read. Use -f switch.\n";
+ exit 66;
+} elsif ($opts{t}) {
$TEST_MODE = 1;
}