[Logcheck-commits] CVS logcheck/src
CVS User ttroxell
logcheck-devel@lists.alioth.debian.org
Tue, 19 Apr 2005 03:40:32 +0000
Update of /cvsroot/logcheck/logcheck/src
In directory haydn:/tmp/cvs-serv28587
Modified Files:
logcheck
Log Message:
revert debug messages, did not realize lockfile-create implies .lock
extension
--- /cvsroot/logcheck/logcheck/src/logcheck 2005/04/19 02:58:41 1.112
+++ /cvsroot/logcheck/logcheck/src/logcheck 2005/04/19 03:40:30 1.113
@@ -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.112 2005/04/19 02:58:41 ttroxell Exp $
+# $Id: logcheck,v 1.113 2005/04/19 03:40:30 ttroxell Exp $
if [ $UID == 0 ]; then
echo "logcheck should not be run as root. Use su to invoke logcheck:"
@@ -81,7 +81,7 @@
SORTUNIQ=0
SUPPORT_CRACKING_IGNORE=0
SYSLOGSUMMARY=0
-LOCKFILE="/var/lock/logcheck/logcheck"
+LOCKFILE="/var/lock/logcheck"
# Carry out the clean up tasks
cleanup() {
@@ -91,8 +91,8 @@
kill $LOCK && unset LOCK
fi
- if [ -f "$LOCKFILE" ]; then
- debug "cleanup: Removing lockfile: $LOCKFILE"
+ if [ -f "$LOCKFILE.lock" ]; then
+ debug "cleanup: Removing lockfile: $LOCKFILE.lock"
lockfile-remove $LOCKFILE
fi
@@ -139,8 +139,8 @@
kill $LOCK && unset LOCK
fi
- if [ -f "$LOCKFILE" ]; then
- debug "error: Removing lockfile: $LOCKFILE"
+ if [ -f "$LOCKFILE.lock" ]; then
+ debug "error: Removing lockfile: $LOCKFILE.lock"
lockfile-remove $LOCKFILE
fi
@@ -591,14 +591,14 @@
trap 'cleanup' 0
-debug "Trying to get lockfile: $LOCKFILE"
+debug "Trying to get lockfile: $LOCKFILE.lock"
lockfile-create --retry 1 $LOCKFILE > /dev/null 2>&1
[10 lines skipped]