summaryrefslogtreecommitdiffstats
path: root/meta/packages/libgsmd/files/gsmd
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2007-11-09 16:45:34 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2007-11-09 16:45:34 +0000
commit41cab4000bf05c8ac575776b43ac20ac31d86004 (patch)
tree9ca1ab4a3cbf9bb5d4026d78c5d368df6c128d51 /meta/packages/libgsmd/files/gsmd
parentd0415cdbf614697693046c24713dd5881d190045 (diff)
downloadpoky-41cab4000bf05c8ac575776b43ac20ac31d86004.tar.gz
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
Diffstat (limited to 'meta/packages/libgsmd/files/gsmd')
-rw-r--r--meta/packages/libgsmd/files/gsmd47
1 files changed, 47 insertions, 0 deletions
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 @@
1#! /bin/sh
2#
3# gsmd This shell script starts and stops gsmd.
4#
5# chkconfig: 345 90 40
6# description: Gsmd manages access to a serial- or USB-connected GSM
7# processname: gsmd
8
9PATH=/bin:/usr/bin:/sbin:/usr/sbin
10
11[ -f /etc/default/rcS ] && . /etc/default/rcS
12[ -f /etc/default/gsmd ] && . /etc/default/gsmd
13
14case "$1" in
15 start)
16 [ -n "$GSM_POW" ] && ( echo "0" >$GSM_POW; sleep 1 )
17 [ -n "$GSM_POW" ] && ( echo "1" >$GSM_POW; sleep 1 )
18 [ -n "$GSM_RES" ] && ( echo "1" >$GSM_RES; sleep 1 )
19 [ -n "$GSM_RES" ] && ( echo "0" >$GSM_RES; sleep 2 )
20
21 echo -n "Starting GSM daemon: "
22 start-stop-daemon -S -x /usr/sbin/gsmd -- gsmd -p $GSM_DEV $GSMD_OPTS >/tmp/gsm.log 2>&1 &
23
24 if [ $? = 0 ]; then
25 echo "gsmd."
26 else
27 echo "(failed.)"
28 fi
29 ;;
30 stop)
31 [ -n "$GSM_POW" ] && echo "0" >$GSM_POW
32
33 echo -n "Stopping GSM daemon: "
34 start-stop-daemon -K -x /usr/sbin/gsmd
35 echo "gsmd."
36 ;;
37 restart|force-reload)
38 $0 stop
39 $0 start
40 ;;
41 *)
42 echo "Usage: /etc/init.d/gsmd {start|stop|restart|force-reload}"
43 exit 1
44 ;;
45esac
46
47exit 0