From df77fe33fccdb46c26e21feba23d76126ff0ecd6 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Fri, 30 Nov 2018 18:20:39 +0100 Subject: Set LC_ALL=C.UTF-8 for unattended-upgrades environment when parsing its --help .UTF-8 sets stdio encoding to UTF-8 which may be ASCII on the system making unattended-upgrades crash. LP: #1806076 --- debian/apt.systemd.daily | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/apt.systemd.daily b/debian/apt.systemd.daily index b532bd151..c6fbca03f 100755 --- a/debian/apt.systemd.daily +++ b/debian/apt.systemd.daily @@ -470,7 +470,7 @@ if [ "$1" = "update" ] || [ -z "$1" ] ; then debug_echo "download upgradable (not run)" fi - if which unattended-upgrade >/dev/null 2>&1 && unattended-upgrade --help | grep -q download-only && check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $UnattendedUpgradeInterval; then + if which unattended-upgrade >/dev/null 2>&1 && env LC_ALL=C.UTF-8 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)" -- cgit v1.2.3