mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-24 21:47:26 +00:00
fuixes
This commit is contained in:
@@ -27,7 +27,6 @@ load_functions() {
|
||||
pve_check
|
||||
arch_check
|
||||
ssh_check
|
||||
check_hostname_conflict
|
||||
set_std_mode
|
||||
# add more
|
||||
}
|
||||
@@ -443,8 +442,14 @@ exit_script() {
|
||||
}
|
||||
|
||||
check_hostname_conflict() {
|
||||
if qm list | awk '{print $2}' | grep -qx "$HN"; then
|
||||
msg_error "Hostname $HN already in use by another VM."
|
||||
local hostname="${HN:-}"
|
||||
if [[ -z "$hostname" ]]; then
|
||||
msg_error "HN is not set – cannot check hostname conflict."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if qm list | awk '{print $2}' | grep -qx "$hostname"; then
|
||||
msg_error "Hostname $hostname already in use by another VM."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user