summaryrefslogtreecommitdiff
path: root/debian/apt.systemd.daily
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2017-06-01 08:24:12 +0200
committerJulian Andres Klode <jak@debian.org>2017-06-19 13:51:46 +0200
commit80b808940e69d2379d175da1aec97c3301cd0777 (patch)
tree2ee31edee6509fde378d42eda8a6c120064176d9 /debian/apt.systemd.daily
parent423ba4a958b9da02926e586bf59995817cafc32a (diff)
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)
Diffstat (limited to 'debian/apt.systemd.daily')
-rwxr-xr-xdebian/apt.systemd.daily4
1 files changed, 2 insertions, 2 deletions
diff --git a/debian/apt.systemd.daily b/debian/apt.systemd.daily
index 0ecbde219..49af931bd 100755
--- 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