mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-08-16 09:52:23 +00:00
Update import-disk-image.sh
This commit is contained in:
parent
6766edd804
commit
ec8eb6d81c
@ -183,13 +183,19 @@ for IMAGE in $SELECTED_IMAGES; do
|
|||||||
LAST_SLOT=$(echo "$EXISTING_DISKS" | tail -n1 | sed "s/${INTERFACE}//")
|
LAST_SLOT=$(echo "$EXISTING_DISKS" | tail -n1 | sed "s/${INTERFACE}//")
|
||||||
NEXT_SLOT=$((LAST_SLOT + 1))
|
NEXT_SLOT=$((LAST_SLOT + 1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Ask if SSD emulation is desired
|
# Ask if SSD emulation is desired (only for non-VirtIO interfaces)
|
||||||
if (whiptail --title "$(translate 'SSD Emulation')" --yesno "$(translate 'Do you want to use SSD emulation for this disk?')" 10 60); then
|
if [ "$INTERFACE" != "virtio" ]; then
|
||||||
SSD_OPTION=",ssd=1"
|
if (whiptail --title "$(translate 'SSD Emulation')" --yesno "$(translate 'Do you want to use SSD emulation for this disk?')" 10 60); then
|
||||||
|
SSD_OPTION=",ssd=1"
|
||||||
|
else
|
||||||
|
SSD_OPTION=""
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
SSD_OPTION=""
|
SSD_OPTION=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
msg_info "$(translate 'Configuring disk')"
|
msg_info "$(translate 'Configuring disk')"
|
||||||
|
|
||||||
@ -200,6 +206,7 @@ for IMAGE in $SELECTED_IMAGES; do
|
|||||||
# Ask if the disk should be bootable
|
# Ask if the disk should be bootable
|
||||||
if (whiptail --title "$(translate 'Make Bootable')" --yesno "$(translate 'Do you want to make this disk bootable?')" 10 60); then
|
if (whiptail --title "$(translate 'Make Bootable')" --yesno "$(translate 'Do you want to make this disk bootable?')" 10 60); then
|
||||||
msg_info "$(translate 'Configuring disk as bootable')"
|
msg_info "$(translate 'Configuring disk as bootable')"
|
||||||
|
|
||||||
if qm set "$VMID" --boot c --bootdisk ${INTERFACE}${NEXT_SLOT} &>/dev/null; then
|
if qm set "$VMID" --boot c --bootdisk ${INTERFACE}${NEXT_SLOT} &>/dev/null; then
|
||||||
msg_ok "$(translate 'Disk configured as bootable')"
|
msg_ok "$(translate 'Disk configured as bootable')"
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user