mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-08 01:37:57 +01:00
Do not abort execute-lxcs on a container that is not Debian or Ubuntu
The skip message printed $name, which is only set once a container has run the command. When a non-Debian container (Alpine, for example) came before any Debian one, set -u ended the run there with "name: unbound variable" and exit 1; later it printed the previous container's name.
This commit is contained in:
@@ -67,7 +67,7 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do
|
||||
else
|
||||
os=$(pct config "$container" | awk '/^ostype/ {print $2}')
|
||||
if [ "$os" != "debian" ] && [ "$os" != "ubuntu" ]; then
|
||||
echo -e "${BL}[Info]${GN} Skipping ${name} ${RD}$container is not Debian or Ubuntu ${CL}"
|
||||
echo -e "${BL}[Info]${GN} Skipping ${RD}$container is not Debian or Ubuntu ${CL}"
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user