Update post-pve-install.sh

Code refactoring
This commit is contained in:
tteckster 2023-05-28 13:38:52 -04:00 committed by GitHub
parent f2c54ba6de
commit c7796d0fd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,9 +142,7 @@ EOF
esac
microcode=""
cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+')
if [ "$cpu" == "GenuineIntel" ]; then
if lscpu | grep -qP 'Model name:.*N'; then
if lscpu | grep -qP 'Vendor ID:.*GenuineIntel' && lscpu | grep -qP 'Model name:.*N'; then
CHOICE=$(whiptail --title "N-SERIES PROCESSOR DETECTED" --menu "\nTo ensure compatibility with Proxmox VE on systems equipped with N-series processors, it is recommended to install the Proxmox 6.2 kernel.\n\nInstall the Proxmox 6.2 kernel now?" 16 58 2 \
"yes" " " \
"no" " " 3>&1 1>&2 2>&3)
@ -160,7 +158,6 @@ EOF
;;
esac
fi
fi
if [ "$microcode" == "need" ]; then
CHOICE=$(whiptail --title "INTEL MICROCODE" --menu "\nMicrocode updates can fix hardware bugs, improve performance, and enhance security features of the processor.\n\nInstall the Intel Microcode now?" 16 58 2 \