[oe-commits] Klaus Kurzmann : fsotdld_git.bb: give it an initscript

git version control git at git.openembedded.org
Wed Apr 14 12:05:07 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 0204b15bb34dfa0abdaed0021c977d2890e240cc
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=0204b15bb34dfa0abdaed0021c977d2890e240cc

Author: Klaus Kurzmann <mok at fluxnetz.de>
Date:   Wed Apr 14 14:03:47 2010 +0200

fsotdld_git.bb: give it an initscript

Signed-off-by: Klaus Kurzmann <mok at fluxnetz.de>

---

 recipes/freesmartphone/fsotdld/fsotdld |   40 ++++++++++++++++++++++++++++++++
 recipes/freesmartphone/fsotdld_git.bb  |   15 +++++++++++-
 2 files changed, 54 insertions(+), 1 deletions(-)

diff --git a/recipes/freesmartphone/fsotdld/fsotdld b/recipes/freesmartphone/fsotdld/fsotdld
new file mode 100644
index 0000000..f43bf4c
--- /dev/null
+++ b/recipes/freesmartphone/fsotdld/fsotdld
@@ -0,0 +1,40 @@
+#! /bin/sh
+#
+# fsotdld -- This shell script starts and stops the FSO2 device subsystem daemon.
+#
+# chkconfig: 345 90 20
+# description: fsotdld is the freesmartphone.org FSO2 time and location daemon
+# processname: fsotdld
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+NAME=fsotdld
+
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+case "$1" in
+    start)
+        echo -n "Starting fsotdld: "
+        start-stop-daemon --start --pidfile /var/run/${NAME}.pid --make-pidfile --background -x /usr/sbin/fsotdld
+        if [ $? = 0 ]; then
+            echo "(ok)"
+        else
+            echo "(failed)"
+        fi
+        ;;
+    stop)
+        echo -n "Stopping fsotdld: "
+        start-stop-daemon --stop --pidfile /var/run/${NAME}.pid --oknodo
+        rm -f /var/run/${NAME}.pid
+        echo "(done)"
+        ;;
+    restart|force-reload)
+        $0 stop
+        $0 start
+        ;;
+    *)
+        echo "Usage: /etc/init.d/fsotdld {start|stop|restart|force-reload}"
+        exit 1
+        ;;
+esac
+
+exit 0
diff --git a/recipes/freesmartphone/fsotdld_git.bb b/recipes/freesmartphone/fsotdld_git.bb
index 3ae74ce..3178924 100644
--- a/recipes/freesmartphone/fsotdld_git.bb
+++ b/recipes/freesmartphone/fsotdld_git.bb
@@ -1,7 +1,20 @@
 require cornucopia.inc
 inherit fso-plugin
 SRCREV = "${FSO_CORNUCOPIA_SRCREV}"
-PR = "${INC_PR}.2"
+PR = "${INC_PR}.3"
 PV = "0.0.0+gitr${SRCREV}"
 
 DEPENDS += "libfsotransport libfsoresource"
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "fsotdld"
+INITSCRIPT_PARAMS = "defaults 27"
+
+SRC_URI += "file://fsotdld"
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/init.d/
+	install -m 0755 ${WORKDIR}/fsotdld ${D}${sysconfdir}/init.d/
+}
+





More information about the Openembedded-commits mailing list