From 80c965368a08f521c648f5398e954d164d859baa Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 12 Oct 2007 18:02:21 +0200 Subject: * debian/apt.cron.daily: - only run the cron job if apt-get check succeeds (LP: #131719) --- debian/apt.cron.daily | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian/apt.cron.daily') 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 -- cgit v1.2.3-70-g09d2