summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2017-04-26 21:39:16 +0200
committerJulian Andres Klode <jak@debian.org>2017-05-05 14:49:30 +0200
commit5c83b304dc507574b85bae20050a95fd9aab0018 (patch)
treee65803e8e712bf88d38c5d87c8ba64a91ce88602 /debian
parentd3169f0704eecf6f5776253c3733ca3259134123 (diff)
Run unattended-upgrade -d in download part
We want to download the upgrades first, if unattended-upgrades is configured. We don't want to use the normal dist-upgrade -d thing for it, though, as unattended-upgrades only upgrades a subset. (cherry picked from commit 01e324a6893164feace153bc17fe6453b6fa97db) (cherry picked from commit f1f796a3c506400f54f4a39b6f43b0494cfb210c)
Diffstat (limited to 'debian')
-rw-r--r--debian/apt.systemd.daily11
1 files changed, 11 insertions, 0 deletions
diff --git a/debian/apt.systemd.daily b/debian/apt.systemd.daily
index 54a8871ea..a8d98494b 100644
--- a/debian/apt.systemd.daily
+++ b/debian/apt.systemd.daily
@@ -434,6 +434,17 @@ if [ "$1" = "update" -o -z "$1" ] ; then
else
debug_echo "download upgradable (not run)"
fi
+
+ if which unattended-upgrade >/dev/null 2>&1 && check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $UnattendedUpgradeInterval; then
+ if unattended-upgrade -d $XUUPOPT; then
+ update_stamp $DOWNLOAD_UPGRADEABLE_STAMP
+ debug_echo "unattended-upgrade -d (success)"
+ else
+ debug_echo "unattended-upgrade -d (error)"
+ fi
+ else
+ debug_echo "unattended-upgrade -d (not run)"
+ fi
fi
if [ "$1" = "install" -o -z "$1" ] ; then