mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-06-28 04:06:54 +00:00
Update menu VM
This commit is contained in:
parent
f61f356d87
commit
1e98059760
@ -78,7 +78,7 @@ function start_vm_configuration() {
|
|||||||
while true; do
|
while true; do
|
||||||
OS_TYPE=$(dialog --backtitle "ProxMenux" \
|
OS_TYPE=$(dialog --backtitle "ProxMenux" \
|
||||||
--title "$(translate "Select System Type")" \
|
--title "$(translate "Select System Type")" \
|
||||||
--menu "$(translate "Choose the type of virtual system to install:")" 18 64 8 \
|
--menu "$(translate "Choose the type of virtual system to install:")" 18 70 8 \
|
||||||
1 "$(translate "Create") VM System NAS" \
|
1 "$(translate "Create") VM System NAS" \
|
||||||
2 "$(translate "Create") VM System Windows" \
|
2 "$(translate "Create") VM System Windows" \
|
||||||
3 "$(translate "Create") VM System Linux" \
|
3 "$(translate "Create") VM System Linux" \
|
||||||
|
@ -20,19 +20,19 @@ mkdir -p "$ISO_DIR"
|
|||||||
function select_nas_iso() {
|
function select_nas_iso() {
|
||||||
|
|
||||||
local NAS_OPTIONS=(
|
local NAS_OPTIONS=(
|
||||||
"1" "Synology DSM VM"
|
"1" "Synology DSM VM (Loader Linux-based)"
|
||||||
"2" "TrueNAS SCALE VM (Fangtooth)"
|
"2" "TrueNAS SCALE VM (Dragonfish)"
|
||||||
"3" "TrueNAS CORE VM (FreeBSD based)"
|
"3" "TrueNAS CORE VM (FreeBSD based)"
|
||||||
"4" "OpenMediaVault VM (Debian based)"
|
"4" "OpenMediaVault VM (Debian based)"
|
||||||
"5" "Rockstor VM (openSUSE based)"
|
"5" "Rockstor VM (openSUSE based)"
|
||||||
"6" "ZimaOS VM (R0GGER proxmox-zimaos)"
|
"6" "ZimaOS VM (R0GGER proxmox-zimaos)"
|
||||||
"7" "$(translate "Return to Main Menu")"
|
"7" "$(translate "Return to Main Menu")"
|
||||||
)
|
)
|
||||||
|
|
||||||
local NAS_TYPE
|
local NAS_TYPE
|
||||||
NAS_TYPE=$(dialog --backtitle "ProxMenux" \
|
NAS_TYPE=$(dialog --backtitle "ProxMenux" \
|
||||||
--title "$(translate "NAS Systems")" \
|
--title "$(translate "NAS Systems")" \
|
||||||
--menu "$(translate "Select the NAS system to install:")" 18 64 10 \
|
--menu "\n$(translate "Select the NAS system to install:")" 18 70 10 \
|
||||||
"${NAS_OPTIONS[@]}" 3>&1 1>&2 2>&3)
|
"${NAS_OPTIONS[@]}" 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
# Si se pulsa ESC o Cancelar
|
# Si se pulsa ESC o Cancelar
|
||||||
|
@ -17,35 +17,66 @@ initialize_cache
|
|||||||
mkdir -p "$ISO_DIR"
|
mkdir -p "$ISO_DIR"
|
||||||
|
|
||||||
function select_windows_iso() {
|
function select_windows_iso() {
|
||||||
local CHOICE
|
local EXIT_FLAG="no"
|
||||||
CHOICE=$(dialog --backtitle "ProxMenux" --title "$(translate "Windows ISO")" \
|
local header
|
||||||
--menu "$(translate "Select how to provide the Windows ISO:")" 15 60 5 \
|
if [[ "$LANGUAGE" == "es" ]]; then
|
||||||
1 "$(translate "Use existing ISO from storage")" \
|
header=$(printf "%-41s│ %s" " Descripción" "Fuente")
|
||||||
2 "$(translate "Download ISO using UUP Dump")" \
|
else
|
||||||
3 "$(translate "Return to Main Menu")" 3>&1 1>&2 2>&3)
|
header=$(printf "%-42s│ %s" " $(translate "Description")" "$(translate "Source")")
|
||||||
|
fi
|
||||||
|
|
||||||
[[ $? -ne 0 ]] && return 1 # ESC o cancelar
|
while [[ "$EXIT_FLAG" != "yes" ]]; do
|
||||||
|
if [[ "$LANGUAGE" == "es" ]]; then
|
||||||
|
CHOICE=$(dialog --clear \
|
||||||
|
--backtitle "ProxMenux" \
|
||||||
|
--title "Opciones de instalación de Windows" \
|
||||||
|
--menu "\nSeleccione el tipo de instalación de Windows:\n\n$header" \
|
||||||
|
18 70 10 \
|
||||||
|
1 "$(printf '%-34s│ %s' 'Instalar con ISO UUP Dump' 'UUP Dump ISO creator')" \
|
||||||
|
2 "$(printf '%-34s│ %s' 'Instalar con ISO personal' 'Almacenamiento local')" \
|
||||||
|
3 "Volver al menú principal" \
|
||||||
|
3>&1 1>&2 2>&3)
|
||||||
|
else
|
||||||
|
local desc1 desc2 back
|
||||||
|
desc1="$(translate "Install with ISO from UUP Dump")"
|
||||||
|
desc2="$(translate "Install with personal ISO")"
|
||||||
|
back="$(translate "Return to main menu")"
|
||||||
|
CHOICE=$(dialog --clear \
|
||||||
|
--backtitle "ProxMenux" \
|
||||||
|
--title "$(translate "Windows Installation Options")" \
|
||||||
|
--menu "\n$(translate "Select the type of Windows installation:")\n\n$header" \
|
||||||
|
16 70 10 \
|
||||||
|
1 "$(printf '%-35s│ %s' "$desc1" "UUP Dump creator")" \
|
||||||
|
2 "$(printf '%-35s│ %s' "$desc2" "Local Storage")" \
|
||||||
|
3 "$back" \
|
||||||
|
3>&1 1>&2 2>&3)
|
||||||
|
fi
|
||||||
|
|
||||||
case "$CHOICE" in
|
if [[ $? -ne 0 || "$CHOICE" == "3" ]]; then
|
||||||
1)
|
unset ISO_NAME ISO_TYPE ISO_URL ISO_FILE ISO_PATH HN
|
||||||
select_existing_iso || return 1
|
return 1
|
||||||
;;
|
fi
|
||||||
2)
|
|
||||||
if source <(curl -fsSL "$UUP_REPO/uupdump_creator.sh"); then
|
case "$CHOICE" in
|
||||||
|
1)
|
||||||
|
if source <(curl -fsSL "$UUP_REPO/uupdump_creator.sh"); then
|
||||||
run_uupdump_creator || return 1
|
run_uupdump_creator || return 1
|
||||||
detect_latest_iso_created || return 1
|
detect_latest_iso_created || return 1
|
||||||
else
|
EXIT_FLAG="yes"
|
||||||
msg_error "$(translate "UUP Dump script not found.")"
|
else
|
||||||
return 1
|
msg_error "$(translate "UUP Dump script not found.")"
|
||||||
fi
|
return 1
|
||||||
;;
|
fi
|
||||||
3)
|
;;
|
||||||
return 1
|
2)
|
||||||
;;
|
select_existing_iso || return 1
|
||||||
esac
|
EXIT_FLAG="yes"
|
||||||
return 0
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function select_existing_iso() {
|
function select_existing_iso() {
|
||||||
ISO_LIST=()
|
ISO_LIST=()
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user