summaryrefslogtreecommitdiff
path: root/debian/apt.cron.daily
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-08-28 12:00:57 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-08-28 12:00:57 +0200
commit88be391791cd77312f19816904ced54d308dd706 (patch)
treeb6703fffb3b4e30da8bcf2470587a31ab2c0b032 /debian/apt.cron.daily
parent4e5e7371044be194c545dc31c8a1d03ed1b659b4 (diff)
parentd7bc74a4e44c4ff97e70f15e19f86761687f2ca5 (diff)
merged from the debian-sid branch
Diffstat (limited to 'debian/apt.cron.daily')
-rw-r--r--debian/apt.cron.daily14
1 files changed, 8 insertions, 6 deletions
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily
index 4507c6858..4d1bbf085 100644
--- a/debian/apt.cron.daily
+++ b/debian/apt.cron.daily
@@ -327,12 +327,14 @@ check_power(){
# ------------------------ main ----------------------------
-# Backup the 7 last versions of APT's extended_states file
-# shameless copy from dpkg cron
-if cd /var/backups ; then
- if ! cmp -s apt.extended_states.0 /var/lib/apt/extended_states; then
- cp -p /var/lib/apt/extended_states apt.extended_states
- savelog -c 7 apt.extended_states >/dev/null
+if test -r /var/lib/apt/extended_states; then
+ # Backup the 7 last versions of APT's extended_states file
+ # shameless copy from dpkg cron
+ if cd /var/backups ; then
+ if ! cmp -s apt.extended_states.0 /var/lib/apt/extended_states; then
+ cp -p /var/lib/apt/extended_states apt.extended_states
+ savelog -c 7 apt.extended_states >/dev/null
+ fi
fi
fi