melawy-archiso-config/Melawy-Linux-Developer-Edition/airootfs/usr/local/bin/remove-ucode

12 lines
321 B
Plaintext
Raw Permalink Normal View History

2024-07-19 21:52:47 +05:00
#!/usr/bin/env bash
# Remove the "wrong" microcode.
case "$(grep -w "^vendor_id" /proc/cpuinfo | head -n 1 | awk '{print $3}')" in
GenuineIntel) pkgname=amd-ucode ;;
AuthenticAMD | *) pkgname=intel-ucode ;;
esac
[[ $(pacman -Q "${pkgname}" 2>/dev/null) ]] && pacman -R --noconfirm "${pkgname}"
exit 0