blob: 91ea057190dc37ac99b2be64603db4d1fc655f96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#!/bin/bash
# Note that none of the INIT stuff below works in the current open-embedded.
### BEGIN INIT INFO
# Provides: rs9113
# Required-Start: mts-io
# Default-Start: S
# Default-Stop: 0 6
# X-Start-Before: networking
# Short-Description: load the rs9113 drivers
# Description: rs9113 drivers are used to provide access to Bluetooth
# and WiFi.
### END INIT INFO
CONFIG=/etc/default/rs9113
[ -f $CONFIG ] || exit 1
. $CONFIG
case "$1" in
start)
/usr/bin/logger -t "rs9113" -p info -s "Loading rs9113 modules"
/usr/sbin/rs9113_load_modules.sh $COEXISTENCE
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
echo "OK"
else
echo "FAIL"
fi
;;
stop)
/usr/bin/logger -t "rs9113" -p info -s "Unloading rs9113 modules"
/usr/sbin/rs9113_remove_modules.sh
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
echo "OK"
else
echo "FAIL"
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
for dir in /sys/class/net/rpine[0-9]* ; do
if [[ -d ${dir} ]] ; then
echo Driver is loaded
exit 0
fi
done
echo Driver is not loaded
exit 3
;;
*)
"Usage: $0 {start|stop|status|restart}"
exit 2
;;
esac
exit 0
|