[Logcheck-commits] CVS logcheck/src

CVS User ttroxell logcheck-devel at lists.alioth.debian.org
Mon Jan 2 08:51:01 UTC 2006


Update of /cvsroot/logcheck/logcheck/src
In directory haydn:/tmp/cvs-serv11950/src

Modified Files:
	logcheck 
Log Message:
update config file checks (see #344553)
update copyright dates


--- /cvsroot/logcheck/logcheck/src/logcheck	2005/12/31 11:22:21	1.130
+++ /cvsroot/logcheck/logcheck/src/logcheck	2006/01/02 08:51:01	1.131
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (C) 2004-2005 Debian Logcheck Team 
+# Copyright (C) 2004-2006 Debian Logcheck Team 
 #                         <logcheck-devel at alioth.lists.debian.org>
 # Copyright (C) 2002,2003 Jonathan Middleton <jjm at ixtab.org.uk>
 # Copyright (C) 1999-2002 Rene Mayrhofer <rmayr at debian.org>
@@ -22,7 +22,7 @@
 # along with Logcheck; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-# $Id: logcheck,v 1.130 2005/12/31 11:22:21 ttroxell Exp $
+# $Id: logcheck,v 1.131 2006/01/02 08:51:01 ttroxell Exp $
 
 if [ $UID == 0 ]; then
     echo "logcheck should not be run as root. Use su to invoke logcheck:"
@@ -475,6 +475,9 @@
 	c)
 	    debug "Setting CONFFILE to $OPTARG"
 	    CONFFILE="$OPTARG"
+            if [ ! -r $CONFFILE ]; then
+                 error "Config file $CONFFILE unreadable or does not exists"
+            fi
 	    ;;
 	d)
 	    LOGCHECKDEBUG=1
@@ -507,7 +510,7 @@
 # Now source the config file - before things that should not be changed
 if [ -r $CONFFILE ]; then
 	. $CONFFILE
-else
+elif [ -f $CONFFILE ]; then
 	error  "Config file $CONFFILE could not be read"
 fi
 



More information about the Logcheck-commits mailing list