fix syntax
This commit is contained in:
parent
a82d04982d
commit
1bb32bbc94
@ -4744,6 +4744,7 @@ create_lxc_container() {
|
|||||||
msg_error "Template still not found after version change"
|
msg_error "Template still not found after version change"
|
||||||
exit 220
|
exit 220
|
||||||
}
|
}
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
msg_error "No ${PCT_OSTYPE} templates available"
|
msg_error "No ${PCT_OSTYPE} templates available"
|
||||||
exit 220
|
exit 220
|
||||||
|
|||||||
@ -834,7 +834,7 @@ is_unattended() {
|
|||||||
# Primary: Check MODE variable (case-insensitive)
|
# Primary: Check MODE variable (case-insensitive)
|
||||||
local mode="${MODE:-${mode:-}}"
|
local mode="${MODE:-${mode:-}}"
|
||||||
mode="${mode,,}" # lowercase
|
mode="${mode,,}" # lowercase
|
||||||
|
|
||||||
case "$mode" in
|
case "$mode" in
|
||||||
default|1)
|
default|1)
|
||||||
return 0
|
return 0
|
||||||
@ -857,15 +857,15 @@ is_unattended() {
|
|||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Legacy fallbacks for compatibility
|
# Legacy fallbacks for compatibility
|
||||||
[[ "${PHS_SILENT:-0}" == "1" ]] && return 0
|
[[ "${PHS_SILENT:-0}" == "1" ]] && return 0
|
||||||
[[ "${var_unattended:-}" =~ ^(yes|true|1)$ ]] && return 0
|
[[ "${var_unattended:-}" =~ ^(yes|true|1)$ ]] && return 0
|
||||||
[[ "${UNATTENDED:-}" =~ ^(yes|true|1)$ ]] && return 0
|
[[ "${UNATTENDED:-}" =~ ^(yes|true|1)$ ]] && return 0
|
||||||
|
|
||||||
# No TTY available = unattended
|
# No TTY available = unattended
|
||||||
[[ ! -t 0 ]] && return 0
|
[[ ! -t 0 ]] && return 0
|
||||||
|
|
||||||
# Default: interactive
|
# Default: interactive
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user