summaryrefslogtreecommitdiff
path: root/debian/apt.systemd.daily
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-03 19:08:50 +0200
commit01e324a6893164feace153bc17fe6453b6fa97db (patch)
treeaf6361b62e5609d4677470cee1930d28a834ef0d /debian/apt.systemd.daily
parent007b22ee6fd33d9b03637577f8401a43c5e7c90c (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.
Diffstat (limited to 'debian/apt.systemd.daily')
-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