microcode fct upd

This commit is contained in:
Francois B 2018-06-05 10:11:13 +02:00
parent 040ee70213
commit c053d40aa1
2 changed files with 6 additions and 6 deletions

View file

@ -373,16 +373,16 @@ function installCardReaderMenu () {
# #
function updateMicrocode () { function updateMicrocode () {
msg "CPU Microcode updating" msg "CPU Microcode updating"
oldMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1` oldMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
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
installPackage apt intel-microcode installPackage apt intel-microcode
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1` newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version" printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
elif [ "$amd" -gt "0" ]; then elif [ "$amd" -gt "0" ]; then
installPackage apt amd64-microcode installPackage apt amd64-microcode
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1` newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version" printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
else else
printf "[INFO] No Intel/AMD CPU found" printf "[INFO] No Intel/AMD CPU found"

View file

@ -397,16 +397,16 @@ function installCardReaderMenu () {
# #
function updateMicrocode () { function updateMicrocode () {
msg "CPU Microcode updating" msg "CPU Microcode updating"
oldMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1` oldMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
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
installPackage apt intel-microcode installPackage apt intel-microcode
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1` newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version" printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
elif [ "$amd" -gt "0" ]; then elif [ "$amd" -gt "0" ]; then
installPackage apt amd64-microcode installPackage apt amd64-microcode
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1` newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version" printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
else else
printf "[INFO] No Intel/AMD CPU found" printf "[INFO] No Intel/AMD CPU found"