cpu microcode update fct fixed

This commit is contained in:
shakasan 2018-05-17 09:08:20 +02:00
parent 180e43974c
commit b0a79d08a6

View file

@ -396,16 +396,20 @@ function installCardReaderMenu () {
# update AMD/Intel CPU Microcode # update AMD/Intel CPU Microcode
# #
function updateMicrocode () { function updateMicrocode () {
msg "CPU Microcode updating"
oldMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1` oldMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1`
intel=`cat /proc/cpuinfo | grep -i Intel | wc -l` intel=`cat /proc/cpuinfo | grep -i Intel | wc -l`
amd=`cat /proc/cpuinfo | grep -i Amd | wc -l` amd=`cat /proc/cpuinfo | grep -i Amd | wc -l`
if [ "$intel" -gt "0" ]; then if [ "$intel" -gt "0" ]; then
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
installPackage apt intel-microcode installPackage apt intel-microcode
elif [ "$amd" -gt "0" ]; then elif [ "$amd" -gt "0" ]; then
installPackage apt amd64-microcode installPackage apt amd64-microcode
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
elif
printf "[INFO] No Intel/AMD CPU found"
fi fi
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1` newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1`
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
printf "\n" printf "\n"
} }