Use onliner for updates (#4414)

This commit is contained in:
Slaviša Arežina
2025-05-12 16:07:07 +02:00
committed by GitHub
parent 4a3ee4db67
commit 9140fd52ac
19 changed files with 106 additions and 115 deletions

View File

@@ -5,7 +5,7 @@
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
function header_info {
function header_info() {
clear
cat <<"EOF"
__ __ __ __ __ _ ________
@@ -64,7 +64,7 @@ function update_container() {
echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} - ${YW}[No disk info for ${os}]${CL}\n"
fi
case "$os" in
alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;;
alpine) pct exec "$container" -- ash -c "apk -U upgrade" ;;
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" ;;