9e323088cb
- Indent with tabs. - Use a function for start. - Pass "-q" to iucode_tool to inhibit usual output that would otherwise interfere with the operation status report. Signed-off-by: Carlos Santos <casantos@datacom.com.br> [Peter: drop dummy function with sed invocation not compatible with busybox] Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
29 lines
407 B
Bash
29 lines
407 B
Bash
#!/bin/sh
|
|
#
|
|
# Upload microcode into the processor.
|
|
#
|
|
|
|
MICROCODE_DIR="/lib/firmware/intel-ucode"
|
|
|
|
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"
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start;;
|
|
stop|restart|reload)
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart|reload}"
|
|
exit 1
|
|
esac
|