Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk 7ca9214599 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.
2026-11-03 10:23:27 +01:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ if [[ "${var_os:-}" == "alpine" ]]; then
var_disk="${var_disk:-1}"
var_version="${var_version:-3.24}"
else
var_ram="${var_ram:-1024}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-4}"
var_version="${var_version:-13}"
fi
+1 -1
View File
@@ -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