summaryrefslogtreecommitdiff
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:45:17 +0200
commitf1f796a3c506400f54f4a39b6f43b0494cfb210c (patch)
tree69279568c1206d2e1f1fb26f670af39c8c2929c0
parentd02da9dcaa9daac2a29cf9d9ee3963bf6098fe4e (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)
-rwxr-xr-xdebian/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 100755
--- 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