fix syntax

This commit is contained in:
CanbiZ (MickLesk) 2026-01-27 13:39:57 +01:00
parent a82d04982d
commit 1bb32bbc94
2 changed files with 5 additions and 4 deletions

View File

@ -4744,6 +4744,7 @@ create_lxc_container() {
msg_error "Template still not found after version change"
exit 220
}
fi
else
msg_error "No ${PCT_OSTYPE} templates available"
exit 220

View File

@ -834,7 +834,7 @@ is_unattended() {
# Primary: Check MODE variable (case-insensitive)
local mode="${MODE:-${mode:-}}"
mode="${mode,,}" # lowercase
case "$mode" in
default|1)
return 0
@ -857,15 +857,15 @@ is_unattended() {
return 1
;;
esac
# Legacy fallbacks for compatibility
[[ "${PHS_SILENT:-0}" == "1" ]] && return 0
[[ "${var_unattended:-}" =~ ^(yes|true|1)$ ]] && return 0
[[ "${UNATTENDED:-}" =~ ^(yes|true|1)$ ]] && return 0
# No TTY available = unattended
[[ ! -t 0 ]] && return 0
# Default: interactive
return 1
}