diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:11 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:57 +0100 |
commit | d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch) | |
tree | f36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-connectivity/gsm/files/gsmd | |
parent | caab7fc509bf27706ff3248689f6afd04225cfda (diff) | |
download | poky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz |
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-connectivity/gsm/files/gsmd')
-rw-r--r-- | meta/recipes-connectivity/gsm/files/gsmd | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/gsm/files/gsmd b/meta/recipes-connectivity/gsm/files/gsmd new file mode 100644 index 0000000000..dc10e63098 --- /dev/null +++ b/meta/recipes-connectivity/gsm/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 | |||
9 | PATH=/bin:/usr/bin:/sbin:/usr/sbin | ||
10 | |||
11 | [ -f /etc/default/rcS ] && . /etc/default/rcS | ||
12 | [ -f /etc/default/gsmd ] && . /etc/default/gsmd | ||
13 | |||
14 | case "$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 -d -l syslog | ||
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 | ;; | ||
45 | esac | ||
46 | |||
47 | exit 0 | ||