Update update-lxcs.sh

add rocky -centos-alma
This commit is contained in:
tteckster 2023-02-02 10:35:31 -05:00 committed by GitHub
parent eec85f39e7
commit 108f3ffe5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
function header_info { function header_info {
cat <<"EOF" cat <<"EOF"
__ __ __ __ __ _ ________ __ __ __ __ __ _ ________
@ -41,9 +41,9 @@ function update_container() {
if [ "$os" == "alpine" ]; then if [ "$os" == "alpine" ]; then
pct exec $container -- ash -c "apk update && apk upgrade" pct exec $container -- ash -c "apk update && apk upgrade"
elif [ "$os" == "ubuntu" ] || [ "$os" == "debian" ] || [ "$os" == "devuan" ]; then elif [ "$os" == "ubuntu" ] || [ "$os" == "debian" ] || [ "$os" == "devuan" ]; then
pct exec $container -- bash -c "apt-get update && apt-get upgrade -y && apt-get clean && apt-get --purge autoremove -y" pct exec $container -- bash -c "apt-get update && apt-get -y upgrade"
elif [ "$os" == "fedora" ]; then elif [ "$os" == "fedora" ] || [ "$os" == "rocky" ] || [ "$os" == "centos" ] || [ "$os" == "alma" ]; then
pct exec $container -- bash -c "dnf -y update && dnf -y upgrade && dnf -y --purge autoremove" pct exec $container -- bash -c "dnf -y update && dnf -y upgrade"
elif [ "$os" == "archlinux" ]; then elif [ "$os" == "archlinux" ]; then
pct exec $container -- bash -c "pacman -Syyu --noconfirm" pct exec $container -- bash -c "pacman -Syyu --noconfirm"
else else