#!/bin/bash # # ipw3945 Intel 3945 Wireless Device startup/shutdown script. # # chkconfig: 2345 20 70 # description: Ipw3945 is a kernel module for Intel 3945 Wireless device. # This script contains its driver and firmware handlings. # processname: ipw3945 # pidfile: /var/run/ipw3945d.pid # Source function library. . /etc/init.d/functions ## Source networking configuration. #[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network # Check that networking is up. [ "${NETWORKING}" = "no" ] && exit 0 [ -x /usr/sbin/ipw3945d ] || exit 0 RETVAL=0 prog="ipw3945" start() { echo -n $"Starting $prog: " /sbin/modprobe ipw3945 RETVAL=$? if test $RETVAL -eq 0; then /usr/sbin/ipw3945d --isrunning || /usr/sbin/ipw3945d --quiet fi RETVAL=$? echo return $RETVAL } reload() { stop start return $RETVAL } stop() { # Stop daemons. echo -n $"Shutting down $prog: " if [ -f /var/run/ipw3945d.pid ]; then /usr/sbin/ipw3945d --kill; RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/run/ipw3945d.pid fi RETVAL=$? echo return $RETVAL } status() { [ -f /var/run/ipw3945d.pid ] && return 0 || return 1 } # See how we were called. case "$1" in start) start ;; stop) stop ;; reload) reload RETVAL=$? ;; restart) stop start RETVAL=$? ;; status) status RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|status}" exit 1 esac exit $RETVAL