summaryrefslogtreecommitdiff
path: root/debian/apt.cron.daily
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-10-12 18:02:21 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2007-10-12 18:02:21 +0200
commit80c965368a08f521c648f5398e954d164d859baa (patch)
tree0d83361259d3ad1ec0e48002d78d7148b8b91ea1 /debian/apt.cron.daily
parentadf1b8befd5b79d39386af24aff627e856ad953b (diff)
* debian/apt.cron.daily:
- only run the cron job if apt-get check succeeds (LP: #131719)
Diffstat (limited to 'debian/apt.cron.daily')
-rw-r--r--debian/apt.cron.daily6
1 files changed, 6 insertions, 0 deletions
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily
index 48714ec15..4f7eff47b 100644
--- a/debian/apt.cron.daily
+++ b/debian/apt.cron.daily
@@ -170,6 +170,12 @@ if which on_ac_power >/dev/null; then
fi
fi
+# check if we can lock the cache and if the cache is clean
+if ! apt-get check -q -q 2>/dev/null; then
+ exit 1
+fi
+
+
UPDATE_STAMP=/var/lib/apt/periodic/update-stamp
if check_stamp $UPDATE_STAMP $UpdateInterval; then
if apt-get -qq update 2>/dev/null; then