mirror of https://github.com/tteck/Proxmox.git
parent
f80821cf7b
commit
db8d22f721
|
@ -168,17 +168,14 @@ function advanced_settings() {
|
||||||
if VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$VMID" ]; then
|
if [ -z "$VMID" ]; then
|
||||||
VMID="$NEXTID"
|
VMID="$NEXTID"
|
||||||
echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"
|
|
||||||
break
|
|
||||||
else
|
|
||||||
if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then
|
|
||||||
echo -e "${CROSS}${RD} ID $VMID is already in use${CL}"
|
|
||||||
sleep 2
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"
|
|
||||||
break
|
|
||||||
fi
|
fi
|
||||||
|
if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then
|
||||||
|
echo -e "${CROSS}${RD} ID $VMID is already in use${CL}"
|
||||||
|
sleep 2
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"
|
||||||
|
break
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue