mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-03 18:35:55 +00:00
Show container ID warning only for user-specified IDs
The warning about a container ID being in use is now only shown if the user manually specified an ID, not when the ID is auto-assigned. This reduces unnecessary warnings during automated container creation.
This commit is contained in:
@@ -587,7 +587,10 @@ base_settings() {
|
|||||||
# Validate and set Container ID
|
# Validate and set Container ID
|
||||||
local requested_id="${var_ctid:-$NEXTID}"
|
local requested_id="${var_ctid:-$NEXTID}"
|
||||||
if ! validate_container_id "$requested_id"; then
|
if ! validate_container_id "$requested_id"; then
|
||||||
msg_warn "Container ID $requested_id is already in use. Using next available ID: $(get_valid_container_id "$requested_id")"
|
# Only show warning if user manually specified an ID (not auto-assigned)
|
||||||
|
if [[ -n "${var_ctid:-}" ]]; then
|
||||||
|
msg_warn "Container ID $requested_id is already in use. Using next available ID: $(get_valid_container_id "$requested_id")"
|
||||||
|
fi
|
||||||
requested_id=$(get_valid_container_id "$requested_id")
|
requested_id=$(get_valid_container_id "$requested_id")
|
||||||
fi
|
fi
|
||||||
CT_ID="$requested_id"
|
CT_ID="$requested_id"
|
||||||
|
|||||||
Reference in New Issue
Block a user