Ticket #1003: K34modem

File K34modem, 424 bytes (added by sean_chiang@…, 12 years ago)

/etc/rc0.d/K34modem

Line 
1#!/bin/sh
2#
3# issues the poweroff function to GSM modem
4
5PATH=/bin:/usr/bin:/sbin:/usr/sbin
6
7[ -f /etc/default/rcS ] && . /etc/default/rcS
8[ -f /etc/default/gsmd ] && . /etc/default/gsmd
9
10case "$1" in
11start)
12# Do nothing if starting; gsmd will do that.
13;;
14
15stop)
16echo -n "Power off GSM modem: "
17
18# Power off the modem.
19echo m | libgsmd-tool -m shell
20;;
21*)
22echo "Usage: /etc/init.d/modem {start|stop}"
23exit 1
24;;
25esac
26
27exit 0