summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2009-08-11 18:17:03 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2009-08-14 15:25:38 +0200
commitbff75b0e896167680266634fc46bc43f8e6e6403 (patch)
tree23704c510056954f770508e18ad2cdfe8fb8fa52 /generic
parentfe1300a11fdf3c7a47ac893f223bd1d4343cab41 (diff)
downloadptxdist-bff75b0e896167680266634fc46bc43f8e6e6403.tar.gz
ptxdist-bff75b0e896167680266634fc46bc43f8e6e6403.tar.xz
[splashutils] initial version.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'generic')
-rw-r--r--generic/etc/init.d/splashutils53
1 files changed, 53 insertions, 0 deletions
diff --git a/generic/etc/init.d/splashutils b/generic/etc/init.d/splashutils
new file mode 100644
index 000000000..66b7be2d6
--- /dev/null
+++ b/generic/etc/init.d/splashutils
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# This is an splashutils daemon init.d script which ist called by init(1) with [start|stop] as argument
+#
+
+PATH=/sbin:/bin:/usr/bin
+FUCNTIONS=/sbin/splash-functions.sh
+
+# --- nothing to change after this line ---
+
+. $FUCNTIONS
+
+mkdir -p /var/run/splash/cache/
+
+start_proc() {
+ echo -n "starting splashutils daemon..."
+ splash_start || (echo failed; exit 1)
+ echo "done"
+}
+
+stop_proc() {
+ echo -n "stopping splashutils daemon..."
+ splash_exit
+ echo "done"
+}
+
+
+case "$1" in
+ start)
+ start_proc
+ ;;
+ stop)
+ stop_proc
+ ;;
+ restart|force-reload)
+ echo -n "restarting splashutils daemon..."
+ stop_proc
+ sleep 2
+ start_proc
+ echo "done"
+ ;;
+ reload)
+ echo "Not supported" >&2
+ exit 1
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
+