From c40976d02063f021bc92bca3b6813993a3f42901 Mon Sep 17 00:00:00 2001 From: Gorn <3+gorn@noreply.localhost> Date: Wed, 29 Apr 2026 16:08:10 +0200 Subject: [PATCH] Fix sed pattern: Remove broken grouping/escaping, use simple literal match --- linux/kubuntu/setup-unattended-upgrades-full.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/linux/kubuntu/setup-unattended-upgrades-full.sh b/linux/kubuntu/setup-unattended-upgrades-full.sh index 58e3595..e5de34a 100644 --- a/linux/kubuntu/setup-unattended-upgrades-full.sh +++ b/linux/kubuntu/setup-unattended-upgrades-full.sh @@ -26,14 +26,10 @@ cp "$CONF" "${CONF}.bak.$(date +%Y%m%d)" # Security-Updates und reguläre Updates aktivieren # Die ${distro_id}-Variablen werden von unattended-upgrades selbst aufgelöst, # daher müssen sie im sed-Pattern als Literal-Strings stehen. -# shellcheck disable=SC2016 -sed -i 's|//[[:space:]]*\("\${distro_id}:\${distro_codename}-security";")|\1|' "$CONF" -# shellcheck disable=SC2016 -sed -i 's|//[[:space:]]*\("\${distro_id}ESMApps:\${distro_codename}-apps-security";")|\1|' "$CONF" -# shellcheck disable=SC2016 -sed -i 's|//[[:space:]]*\("\${distro_id}ESM:\${distro_codename}-infra-security";")|\1|' "$CONF" -# shellcheck disable=SC2016 -sed -i 's|//[[:space:]]*\("\${distro_id}:\${distro_codename}-updates";")|\1|' "$CONF" +sed -i 's|//[[:space:]]*"\${distro_id}:\${distro_codename}-security";|"\${distro_id}:\${distro_codename}-security";|' "$CONF" +sed -i 's|//[[:space:]]*"\${distro_id}ESMApps:\${distro_codename}-apps-security";|"\${distro_id}ESMApps:\${distro_codename}-apps-security";|' "$CONF" +sed -i 's|//[[:space:]]*"\${distro_id}ESM:\${distro_codename}-infra-security";|"\${distro_id}ESM:\${distro_codename}-infra-security";|' "$CONF" +sed -i 's|//[[:space:]]*"\${distro_id}:\${distro_codename}-updates";|"\${distro_id}:\${distro_codename}-updates";|' "$CONF" echo "[4/7] 20auto-upgrades setzen..." cat > /etc/apt/apt.conf.d/20auto-upgrades << 'AUTOEOF'