[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] cron.unchecked: improve error message if locking fails



Signed-off-by: Torsten Werner <twerner@debian.org>
---
 config/debian/cron.unchecked |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/config/debian/cron.unchecked b/config/debian/cron.unchecked
index e4bfe54..83372f9 100755
--- a/config/debian/cron.unchecked
+++ b/config/debian/cron.unchecked
@@ -94,7 +94,10 @@ export LC_ALL=C
 #rm -f "$LOCK_NEW"
 
 # only run one cron.unchecked
-lockfile -r8 $LOCKFILE || exit 0
+if ! lockfile -r8 $LOCKFILE; then
+    echo "aborting cron.unchecked because $LOCKFILE has already been locked"
+    exit 0
+fi
 trap cleanup 0
 
 do_newstage
-- 
1.5.6.5


Reply to: