]>
Commit | Line | Data |
---|---|---|
cc8cd1f2 | 1 | #!/bin/sh |
2 | # | |
3 | # chkconfig: 2345 11 89 | |
4 | # description: loads em8300 modules and uploads microcode | |
5 | ||
6 | if [ ! -f /etc/sysconfig/em8300 ]; then | |
7 | exit 0 | |
8 | fi | |
9 | ||
10 | # Source function library. | |
11 | . /etc/rc.d/init.d/functions | |
12 | ||
13 | . /etc/sysconfig/em8300 | |
14 | ||
15 | start() { | |
16 | is_yes "$BT_LOAD" && _modprobe single bt865 $BT_OPT | |
17 | _modprobe single adv717x $ADV_OPT | |
18 | _modprobe single em8300 $EM_OPT | |
19 | run_cmd "Uploading em8300 microcode" "sh -c 'em8300setup 2>/dev/null'" | |
20 | [ $? -ne 0 ] && RETVAL=1 | |
21 | } | |
22 | ||
23 | stop() { | |
24 | run_cmd "Removing em8300 modules" "sh -c 'rmmod em8300 adv717x bt865 2>/dev/null'" | |
25 | } | |
26 | ||
27 | RETVAL=0 | |
28 | # See how we were called. | |
29 | case "$1" in | |
30 | start|reload|force-reload) | |
31 | start | |
32 | ;; | |
33 | stop) | |
34 | stop | |
35 | ;; | |
36 | status) | |
37 | ;; | |
38 | restart) | |
39 | stop | |
40 | start | |
41 | ;; | |
42 | *) | |
43 | msg_usage "$0 {start|stop|restart|reload|force-reload|status}" | |
44 | exit 3 | |
45 | esac | |
46 | ||
47 | exit $RETVAL |