#! /bin/bash # # ipw3945 # # chkconfig: 2345 6 96 # description: Loads/unloads the ipw3945 driver # ### BEGIN INIT INFO # Provides: $network ### END INIT INFO # Source function library. . /etc/init.d/functions #if [ ! -f /etc/sysconfig/network ]; then # exit 0 #fi # See how we were called. case "$1" in start) # Load ipw3945 module [ -x /sbin/lsmod -a -x /sbin/modprobe ] && { if ! /sbin/lsmod | grep ipw3945 > /dev/null ; then action $"Starting ipw3945: " /sbin/modprobe ipw3945 || exit 1 sleep 2s fi /sbin/ipw3945d --quiet } ;; stop) action $"Stopping ipw3945: " /sbin/ipw3945d --kill rmmod ipw3945 ;; status) #action $"Checking ipw3945: " /sbin/ipw3945d --isrunning ;; restart|reload) cd "$CWD" $0 stop $0 start ;; *) echo $"Usage: $0 {start|stop|restart|reload|status}" exit 1 esac exit 0