summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Santos <casantos@datacom.com.br>2018-11-04 19:02:41 -0200
committerPeter Korsgaard <peter@korsgaard.com>2018-11-12 22:48:23 +0100
commit9e323088cb179f6b3d8bcb9ec388eb41c1d018e4 (patch)
treeedcf45f293eda6d25810ca5ce5a9b972c1ac924b
parentd6b61d1094c4f1dc533e2b6aeadf240647629278 (diff)
downloadbuildroot-9e323088cb179f6b3d8bcb9ec388eb41c1d018e4.tar.gz
buildroot-9e323088cb179f6b3d8bcb9ec388eb41c1d018e4.zip
iucode-tool: rewrite init script
- 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>
-rw-r--r--package/iucode-tool/S00iucode-tool33
1 files changed, 19 insertions, 14 deletions
diff --git a/package/iucode-tool/S00iucode-tool b/package/iucode-tool/S00iucode-tool
index a97b33c045..393c903b41 100644
--- a/package/iucode-tool/S00iucode-tool
+++ b/package/iucode-tool/S00iucode-tool
@@ -5,19 +5,24 @@
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)
- echo "Starting iucode-tool:"
- /usr/sbin/iucode_tool -k "$MICROCODE_DIR"
- echo "done"
- ;;
- stop)
- ;;
- restart|reload)
- ;;
- *)
- echo "Usage: $0 {start|stop|restart}"
- exit 1
+ start)
+ start;;
+ stop|restart|reload)
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload}"
+ exit 1
esac
-
-exit $?
OpenPOWER on IntegriCloud