[Logcheck-commits] CVS logcheck/src

CVS User ttroxell logcheck-devel at lists.alioth.debian.org
Fri Sep 2 06:38:22 UTC 2005


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

Modified Files:
	logcheck 
Log Message:
Set logcheck to remove cleanup trap when failing to get lockfile.
This will prevent the confusing "rm: too few arguments" error.

Also add error reporting to STDOUT reports.



--- /cvsroot/logcheck/logcheck/src/logcheck	2005/09/02 01:03:38	1.128
+++ /cvsroot/logcheck/logcheck/src/logcheck	2005/09/02 06:38:22	1.129
@@ -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.128 2005/09/02 01:03:38 ttroxell Exp $
+# $Id: logcheck,v 1.129 2005/09/02 06:38:22 ttroxell Exp $
 
 if [ $UID == 0 ]; then
     echo "logcheck should not be run as root. Use su to invoke logcheck:"
@@ -169,6 +169,11 @@
 EOF
 	} | mail -s "Logcheck: $HOSTNAME $DATE exiting due to errors" \
 	    $SENDMAILTO
+    
+    elif [ $MAILOUT -eq 1 ]; then
+          {
+	      echo "Error: $message."
+	  }
     fi
     exit 1
 }
@@ -611,6 +616,7 @@
 
 
 if [ $? -eq 1 ]; then 
+    trap 0
     error "Failed to get lockfile: $LOCKFILE.lock" "noclean"
 else 
     debug "Running lockfile-touch $LOCKFILE.lock"



More information about the Logcheck-commits mailing list