From 925ebf2ad878faecab622b34e652a33daeb8156b Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 1 Jun 2017 08:24:12 +0200 Subject: apt.systemd.daily: Use unattended-ugrade --download-only if available Instead of passing -d, which enables a debugging mode; check if unattended-upgrade supports an option --download-only (which is yet to be implemented) and use that. Closes: #863859 Gbp-Dch: Full (cherry picked from commit 31c81a37ac6dceda0c94ce088b338b6b09afd5a4, cedf80c55766868eadc7ed59a27537c9a5d91edf) (cherry picked from commit 80b808940e69d2379d175da1aec97c3301cd0777) --- debian/apt.systemd.daily | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/apt.systemd.daily b/debian/apt.systemd.daily index 0ecbde219..49af931bd 100644 --- a/debian/apt.systemd.daily +++ b/debian/apt.systemd.daily @@ -452,8 +452,8 @@ if [ "$1" = "update" -o -z "$1" ] ; then 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 + if which unattended-upgrade >/dev/null 2>&1 && unattended-upgrade --help | grep -q download-only && check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $UnattendedUpgradeInterval; then + if unattended-upgrade --download-only $XUUPOPT; then update_stamp $DOWNLOAD_UPGRADEABLE_STAMP debug_echo "unattended-upgrade -d (success)" else -- cgit v1.2.3