From 6b2df5dd0f85cb2a1483250666ef18ee42dc22a7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 6 Oct 2023 23:48:01 -0400 Subject: [PATCH] Update microcode.sh change whiptail variables --- misc/microcode.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/misc/microcode.sh b/misc/microcode.sh index 7900bacd..a4653be5 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -46,16 +46,16 @@ intel() { intel_microcode=$(curl -fsSL "https://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode//" | grep -o 'href="[^"]*amd64.deb"' | sed 's/href="//;s/"//') [ -z "$intel_microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Found" --msgbox "It appears there were no microcode packages found\n Try again later." 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; } - CTID_MENU=() + MICROCODE_MENU=() MSG_MAX_LENGTH=0 while read -r TAG ITEM; do OFFSET=2 (( ${#ITEM} + OFFSET > MSG_MAX_LENGTH )) && MSG_MAX_LENGTH=${#ITEM}+OFFSET - CTID_MENU+=("$TAG" "$ITEM " "OFF") + MICROCODE_MENU+=("$TAG" "$ITEM " "OFF") done < <(echo "$intel_microcode") - microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit [ -z "$microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Selected" --msgbox "It appears that no microcode packages were selected" 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; } @@ -78,16 +78,16 @@ amd() { [ -z "$amd_microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Found" --msgbox "It appears there were no microcode packages found\n Try again later." 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; } - CTID_MENU=() + MICROCODE_MENU=() MSG_MAX_LENGTH=0 while read -r TAG ITEM; do OFFSET=2 (( ${#ITEM} + OFFSET > MSG_MAX_LENGTH )) && MSG_MAX_LENGTH=${#ITEM}+OFFSET - CTID_MENU+=("$TAG" "$ITEM " "OFF") + MICROCODE_MENU+=("$TAG" "$ITEM " "OFF") done < <(echo "$amd_microcode") - microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit [ -z "$microcode" ] && { whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Selected" --msgbox "It appears that no microcode packages were selected" 10 68; msg_info "Exiting"; sleep 1; msg_ok "Done"; exit; }