2014-02-04 10:25:58 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Upload microcode into the processor.
|
|
|
|
#
|
|
|
|
|
2018-11-04 22:02:39 +01:00
|
|
|
MICROCODE_DIR="/lib/firmware/intel-ucode"
|
2014-02-04 10:25:58 +01:00
|
|
|
|
2018-11-04 22:02:41 +01:00
|
|
|
start() {
|
|
|
|
printf 'Starting iucode-tool: '
|
|
|
|
/usr/sbin/iucode_tool -q -k "$MICROCODE_DIR"
|
|
|
|
status="$?"
|
|
|
|
if [ "$status" = 0 ]; then
|
|
|
|
echo "OK"
|
|
|
|
else
|
|
|
|
echo "FAIL"
|
|
|
|
fi
|
|
|
|
return "$status"
|
|
|
|
}
|
|
|
|
|
2014-02-04 10:25:58 +01:00
|
|
|
case "$1" in
|
2018-11-04 22:02:41 +01:00
|
|
|
start)
|
|
|
|
start;;
|
|
|
|
stop|restart|reload)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|restart|reload}"
|
|
|
|
exit 1
|
2014-02-04 10:25:58 +01:00
|
|
|
esac
|