summaryrefslogtreecommitdiff
path: root/debian/apt.cron.daily
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-06-03 17:01:06 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2008-06-03 17:01:06 +0200
commit2783b2615aa3ed0bf6969c3571fb058a00677645 (patch)
tree6e16bc9cb5baca14a779616cb0b9102ec0e8c29e /debian/apt.cron.daily
parentbe993931c56d0d435e03c80f3afcc31714aec1ba (diff)
parentc5fdf360513f8d2e5858711ff46c744cddcdeb6f (diff)
merged from the debian-sid branch
Diffstat (limited to 'debian/apt.cron.daily')
-rw-r--r--debian/apt.cron.daily11
1 files changed, 11 insertions, 0 deletions
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily
index cdb970521..472d20c6d 100644
--- a/debian/apt.cron.daily
+++ b/debian/apt.cron.daily
@@ -136,6 +136,7 @@ if [ "$VERBOSE" -ge 3 ]; then
# trace output
set -x
fi
+
# laptop check, on_ac_power returns:
# 0 (true) System is on main power
# 1 (false) System is not on main power
@@ -233,6 +234,16 @@ for x in $(seq 0 1 $((${BackupLevel}-1))); do
eval "Back${x}=${Back}${x}/"
done
+# check if we actually have to do anything
+if [ $UpdateInterval -eq 0 ] &&
+ [ $DownloadUpgradeableInterval -eq 0 ] &&
+ [ $UnattendedUpgradeInterval -eq 0 ] &&
+ [ $BackupArchiveInterval -eq 0 ] &&
+ [ $AutocleanInterval -eq 0 ]; then
+ exit 0
+fi
+
+
# backup after n-days if archive contents changed.
# (This uses hardlink to save disk space)
BACKUP_ARCHIVE_STAMP=/var/lib/apt/periodic/backup-archive-stamp