diff --git a/misc/build.func b/misc/build.func index 6a32bf9..5aebb07 100644 --- a/misc/build.func +++ b/misc/build.func @@ -819,8 +819,17 @@ config_file() { exit fi else - msg_error "Container ID cannot be empty" - exit + if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 "$NEXTID" --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi + else + exit_script + fi + fi if [[ -n "$CT_TYPE" ]]; then if [[ "$CT_TYPE" -eq 0 ]]; then @@ -837,7 +846,7 @@ config_file() { exit fi - if [[ -n "$PW" ]]; then + if [[ -n "${PW-}" ]]; then if [[ "$PW" == *" "* ]]; then msg_error "Password cannot be empty" exit