From 01e324a6893164feace153bc17fe6453b6fa97db Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 26 Apr 2017 21:39:16 +0200 Subject: 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. --- debian/apt.systemd.daily | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit v1.2.3