summaryrefslogtreecommitdiff
path: root/debian/apt.cron.daily
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-07-14 11:24:19 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-07-14 11:24:19 +0200
commitadbce12126ccc58016af69d541bafad5c8bde631 (patch)
tree6cdac97fb2b87894c73635f19b3a777c34c4516a /debian/apt.cron.daily
parent217d575b5713f4d9275177b58a36c581a7880c03 (diff)
* debian/apt.cron.daily:
- if the timestamp is too far in the future, delete it (LP: #135262)
Diffstat (limited to 'debian/apt.cron.daily')
-rw-r--r--debian/apt.cron.daily7
1 files changed, 7 insertions, 0 deletions
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily
index 7f2978568..3c440307c 100644
--- a/debian/apt.cron.daily
+++ b/debian/apt.cron.daily
@@ -76,6 +76,13 @@ check_stamp()
#echo "stampfile: $1"
#echo "interval=$interval, now=$now, stamp=$stamp, delta=$delta"
+ # remove timestamps a day (or more) in the future and force re-check
+ if [ $stamp -gt $(($now+86400)) ]; then
+ echo "WARNING: file $stamp_file has a timestamp in the future: $stamp"
+ rm -f "$stamp_file"
+ return 0
+ fi
+
if [ $delta -ge $interval ]; then
return 0
fi