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

Bug#459344: Patch to make the cron script quiet



tags 459344 patch
stop

This would do the trick for me -- making the cron script exit quietly if the cache is locked.

--
\0

diff -ru apt-0.7.10/debian/apt.cron.daily apt-0.7.10-rofl/debian/apt.cron.daily
--- apt-0.7.10/debian/apt.cron.daily	2008-01-08 06:22:37.000000000 +1000
+++ apt-0.7.10-rofl/debian/apt.cron.daily	2008-01-18 12:26:59.000000000 +1000
@@ -174,9 +174,10 @@
 fi
 
 # check if we can lock the cache and if the cache is clean
+# There's a reasonable chance that someone is already running an apt
+# frontend that has locked the cache, so exit quietly if it is locked.
 if ! apt-get check -q -q 2>/dev/null; then
-    echo "$0: could not lock the APT cache"
-    exit 1
+    exit 0
 fi
 
 

Reply to: