From 41cab4000bf05c8ac575776b43ac20ac31d86004 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Fri, 9 Nov 2007 16:45:34 +0000 Subject: libgsmd: update to version from OE (openmoko used one) git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3109 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- meta/packages/libgsmd/files/gsmd | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 meta/packages/libgsmd/files/gsmd (limited to 'meta/packages/libgsmd/files/gsmd') diff --git a/meta/packages/libgsmd/files/gsmd b/meta/packages/libgsmd/files/gsmd new file mode 100644 index 0000000000..9257b901ad --- /dev/null +++ b/meta/packages/libgsmd/files/gsmd @@ -0,0 +1,47 @@ +#! /bin/sh +# +# gsmd This shell script starts and stops gsmd. +# +# chkconfig: 345 90 40 +# description: Gsmd manages access to a serial- or USB-connected GSM +# processname: gsmd + +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +[ -f /etc/default/rcS ] && . /etc/default/rcS +[ -f /etc/default/gsmd ] && . /etc/default/gsmd + +case "$1" in + start) + [ -n "$GSM_POW" ] && ( echo "0" >$GSM_POW; sleep 1 ) + [ -n "$GSM_POW" ] && ( echo "1" >$GSM_POW; sleep 1 ) + [ -n "$GSM_RES" ] && ( echo "1" >$GSM_RES; sleep 1 ) + [ -n "$GSM_RES" ] && ( echo "0" >$GSM_RES; sleep 2 ) + + echo -n "Starting GSM daemon: " + start-stop-daemon -S -x /usr/sbin/gsmd -- gsmd -p $GSM_DEV $GSMD_OPTS >/tmp/gsm.log 2>&1 & + + if [ $? = 0 ]; then + echo "gsmd." + else + echo "(failed.)" + fi + ;; + stop) + [ -n "$GSM_POW" ] && echo "0" >$GSM_POW + + echo -n "Stopping GSM daemon: " + start-stop-daemon -K -x /usr/sbin/gsmd + echo "gsmd." + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + echo "Usage: /etc/init.d/gsmd {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 -- cgit v1.2.3-54-g00ecf