]> git.pld-linux.org Git - packages/em8300.git/blob - em8300.init
- massive attack: adding Source-md5
[packages/em8300.git] / em8300.init
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 RETVAL=0
16 # See how we were called.
17 case "$1" in
18   start|reload|force-reload)
19         is_yes "$BT_LOAD" && _modprobe single bt865 $BT_OPT
20         _modprobe single adv717x $ADV_OPT
21         _modprobe single em8300 $EM_OPT
22         run_cmd "Uploading em8300 microcode" "sh -c 'em8300_microcode_upload 2>/dev/null'"
23         [ $? -ne 0 ] && RETVAL=1
24         ;;
25   stop)
26         run_cmd "Removing em8300 modules" "sh -c 'rmmod em8300 adv717x bt865 2>/dev/null'"
27         ;;
28   status)
29         ;;
30   restart)
31         $0 stop
32         $0 start
33         exit $?
34         ;;
35   *)
36         msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
37         exit 3
38 esac
39
40 exit $RETVAL
This page took 0.09552 seconds and 3 git commands to generate.