3 # gsmd This shell script starts and stops gsmd.
6 # description: Gsmd manages access to a serial- or USB-connected GSM
9 PATH=/bin:/usr/bin:/sbin:/usr/sbin
11 [ -f /etc/default/rcS ] && . /etc/default/rcS
12 [ -f /etc/default/gsmd ] && . /etc/default/gsmd
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 )
21 echo -n "Starting GSM daemon: "
22 start-stop-daemon -S -x /usr/sbin/gsmd -- gsmd -p $GSM_DEV $GSMD_OPTS -d -l syslog
31 [ -n "$GSM_POW" ] && echo "0" >$GSM_POW
33 echo -n "Stopping GSM daemon: "
34 start-stop-daemon -K -x /usr/sbin/gsmd
42 echo "Usage: /etc/init.d/gsmd {start|stop|restart|force-reload}"