mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-08-15 09:22:23 +00:00
Update upgrade_pve8_to_pve9.sh
This commit is contained in:
parent
9a27138d96
commit
0654a3ed55
@ -48,6 +48,15 @@ done
|
||||
# ==========================================================
|
||||
|
||||
|
||||
run_manual_guide() {
|
||||
local url="$REPO_URL/scripts/utilities/proxmox-upgrade-pve8-to-pve9-manual-guide.sh"
|
||||
if command -v curl >/dev/null 2>&1; then
|
||||
bash <(curl -fsSL "$url")
|
||||
else
|
||||
bash <(wget -qO- "$url")
|
||||
fi
|
||||
}
|
||||
|
||||
ask_run_mode() {
|
||||
|
||||
if [[ "${ASSUME_YES:-0}" == "1" ]]; then
|
||||
@ -57,8 +66,10 @@ ask_run_mode() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
||||
while true; do
|
||||
if command -v dialog >/dev/null 2>&1; then
|
||||
local title text choice
|
||||
local title text choice status
|
||||
title="$(translate "Select run mode")"; [[ -z "$title" ]] && title="Select run mode"
|
||||
text="$(translate "Choose how to perform the upgrade:")"; [[ -z "$text" ]] && text="Choose how to perform the upgrade:"
|
||||
title=${title//$'\r'/}; title=${title//$'\n'/' '}
|
||||
@ -74,6 +85,7 @@ ask_run_mode() {
|
||||
3>&1 1>&2 2>&3
|
||||
); status=$?
|
||||
|
||||
|
||||
if [[ $status -ne 0 ]]; then
|
||||
show_proxmenux_logo || true
|
||||
msg_warn "$(translate "Action canceled by user")"
|
||||
@ -88,19 +100,17 @@ ask_run_mode() {
|
||||
msg_info2 "$(translate "Run mode selected: Unattended")"
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export APT_LISTCHANGES_FRONTEND=none
|
||||
break
|
||||
;;
|
||||
3)
|
||||
local url="$REPO_URL/scripts/utilities/proxmox-upgrade-pve8-to-pve9-manual-guide.sh"
|
||||
if command -v curl >/dev/null 2>&1; then
|
||||
bash <(curl -fsSL "$url")
|
||||
else
|
||||
bash <(wget -qO- "$url")
|
||||
fi
|
||||
run_manual_guide
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
show_proxmenux_logo || true
|
||||
msg_title "$(translate "Upgrade assistant: Proxmox VE 8 → 9 (Trixie)")"
|
||||
msg_info2 "$(translate "Run mode selected: Interactive")"
|
||||
break
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -118,39 +128,61 @@ ask_run_mode() {
|
||||
msg_warn "$(translate "Action canceled by user")"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "$choice" in
|
||||
1) ASSUME_YES="1"; msg_info2 "$(translate "Run mode selected: Unattended")"
|
||||
1)
|
||||
ASSUME_YES="1"
|
||||
show_proxmenux_logo || true
|
||||
msg_title "$(translate "Upgrade assistant: Proxmox VE 8 → 9 (Trixie)")"
|
||||
msg_info2 "$(translate "Run mode selected: Unattended")"
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export APT_LISTCHANGES_FRONTEND=none ;;
|
||||
3) local url="$REPO_URL/scripts/utilities/proxmox-upgrade-pve8-to-pve9-manual-guide.sh"
|
||||
if command -v curl >/dev/null 2>&1; then
|
||||
bash <(curl -fsSL "$url")
|
||||
else
|
||||
bash <(wget -qO- "$url")
|
||||
fi ;;
|
||||
*) msg_info2 "$(translate "Run mode selected: Interactive")" ;;
|
||||
export APT_LISTCHANGES_FRONTEND=none
|
||||
break
|
||||
;;
|
||||
3)
|
||||
run_manual_guide
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
show_proxmenux_logo || true
|
||||
msg_title "$(translate "Upgrade assistant: Proxmox VE 8 → 9 (Trixie)")"
|
||||
msg_info2 "$(translate "Run mode selected: Interactive")"
|
||||
break
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
printf "%s" "$(translate "Select run mode: [1]unattended / [2]interactive / [3]manual guide? (default: 2): ")"
|
||||
read -r ans
|
||||
case "$ans" in
|
||||
1) ASSUME_YES="1"; msg_info2 "$(translate "Run mode selected: Unattended")"
|
||||
1)
|
||||
ASSUME_YES="1"
|
||||
show_proxmenux_logo || true
|
||||
msg_title "$(translate "Upgrade assistant: Proxmox VE 8 → 9 (Trixie)")"
|
||||
msg_info2 "$(translate "Run mode selected: Unattended")"
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export APT_LISTCHANGES_FRONTEND=none ;;
|
||||
3) local url="$REPO_URL/scripts/utilities/proxmox-upgrade-pve8-to-pve9-manual-guide.sh"
|
||||
if command -v curl >/dev/null 2>&1; then
|
||||
bash <(curl -fsSL "$url") || exit 1
|
||||
else
|
||||
bash <(wget -qO- "$url") || exit 1
|
||||
fi ;;
|
||||
*) msg_info2 "$(translate "Run mode selected: Interactive")" ;;
|
||||
export APT_LISTCHANGES_FRONTEND=none
|
||||
break
|
||||
;;
|
||||
3)
|
||||
run_manual_guide
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
show_proxmenux_logo || true
|
||||
msg_title "$(translate "Upgrade assistant: Proxmox VE 8 → 9 (Trixie)")"
|
||||
msg_info2 "$(translate "Run mode selected: Interactive")"
|
||||
break
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# ==========================================================
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user