fix: make ssh authorized key default to empty string if unset (#1313)

This commit is contained in:
Dominik Siebel 2025-01-07 10:44:23 +01:00 committed by GitHub
parent 43283bdb7e
commit 716f1df409
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -625,6 +625,8 @@ advanced_settings() {
if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then
echo "Warning: No SSH key provided." echo "Warning: No SSH key provided."
fi fi
else
SSH_AUTHORIZED_KEY=""
fi fi
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
@ -791,7 +793,7 @@ build_container() {
export PASSWORD="$PW" export PASSWORD="$PW"
export VERBOSE="$VERB" export VERBOSE="$VERB"
export SSH_ROOT="${SSH}" export SSH_ROOT="${SSH}"
export SSH_AUTHORIZED_KEY="${SSH_AUTHORIZED_KEY}" export SSH_AUTHORIZED_KEY="${SSH_AUTHORIZED_KEY:-}"
export CTID="$CT_ID" export CTID="$CT_ID"
export CTTYPE="$CT_TYPE" export CTTYPE="$CT_TYPE"
export PCT_OSTYPE="$var_os" export PCT_OSTYPE="$var_os"