From c502e413de7225e8ac8020fe7747f644ff0208ef Mon Sep 17 00:00:00 2001 From: Loren Burkholder <55629213+LorenDB@users.noreply.github.com> Date: Mon, 9 Sep 2024 14:15:31 -0400 Subject: [PATCH] Add openSUSE support to LXC update scripts (#3683) --- misc/update-lxcs-cron.sh | 1 + misc/update-lxcs.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/misc/update-lxcs-cron.sh b/misc/update-lxcs-cron.sh index 50daedb5..ec397b5b 100644 --- a/misc/update-lxcs-cron.sh +++ b/misc/update-lxcs-cron.sh @@ -17,6 +17,7 @@ function update_container() { archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;; fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y; rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED" ;; + opensuse) pct exec "$container" -- bash -c "zypper ref && zypper --non-interactive dup" ;; esac } diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index 1ad3b5cd..c4ea80f9 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -68,6 +68,7 @@ function update_container() { archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;; fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -yq dist-upgrade 2>&1; rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED" ;; + opensuse) pct exec "$container" -- bash -c "zypper ref && zypper --non-interactive dup" ;; esac }