Bugfix: Mikrotik & Pimox HAOS VM (NEXTID) (#4313)

This commit is contained in:
CanbiZ 2025-05-08 12:57:27 +02:00 committed by GitHub
parent 69298090ce
commit 607d966322
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 7 deletions

View File

@ -114,8 +114,8 @@ function msg_ok() {
}
function default_settings() {
METHOD="default"
echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}"
VMID=$NEXTID
VMID=$(get_valid_nextid)
echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}"
echo -e "${DGN}Using Hostname: ${BGN}mikrotik-routeros-chr${CL}"
HN=mikrotik-routeros-chr
echo -e "${DGN}Allocated Cores: ${BGN}1${CL}"
@ -136,7 +136,8 @@ function default_settings() {
}
function advanced_settings() {
METHOD="advanced"
VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3)
[ -z "${VMID:-}" ] && VMID=$(get_valid_nextid)
VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $VMID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then
echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}"

View File

@ -137,8 +137,8 @@ function default_settings() {
METHOD="default"
echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}"
BRANCH=${STABLE}
echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}"
VMID=$NEXTID
VMID=$(get_valid_nextid)
echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}"
echo -e "${DGN}Using Hostname: ${BGN}haos${STABLE}${CL}"
HN=haos${STABLE}
echo -e "${DGN}Allocated Cores: ${BGN}2${CL}"
@ -166,10 +166,11 @@ function advanced_settings() {
3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi
VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
[ -z "${VMID:-}" ] && VMID=$(get_valid_nextid)
VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $VMID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
exitstatus=$?
if [ -z $VMID ]; then
VMID="$NEXTID"
VMID="$VMID"
echo -e "${DGN}Virtual Machine: ${BGN}$VMID${CL}"
else
if echo "$USEDID" | egrep -q "$VMID"; then