From 4d645a31a6b11f43f4efa8d63ad95157589f5959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C4=83rcziem=20=E2=84=A2?= <118485377+spalencsar@users.noreply.github.com> Date: Fri, 3 Oct 2025 12:01:43 +0200 Subject: [PATCH] fix(unattended): ensure noninteractive env under sudo and silence apt-listchanges --- lib/unattended-upgrades.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/unattended-upgrades.sh b/lib/unattended-upgrades.sh index ca78d5d..b4a6e55 100644 --- a/lib/unattended-upgrades.sh +++ b/lib/unattended-upgrades.sh @@ -12,7 +12,8 @@ configure_unattended_upgrades() { unattended-upgrades unattended-upgrades/enable_auto_updates boolean true DEBCONF # Install non-interactively and avoid dpkg prompts by forcing noninteractive frontend - sudo DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y unattended-upgrades apt-listchanges + # Use 'sudo env' to ensure environment vars are set for the root process + handle_error sudo env DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y unattended-upgrades apt-listchanges # Do not call dpkg-reconfigure interactively; we will write the config files directly # Configure unattended-upgrades for security only