/[kernel]/people/jurij/ipw3945-daemon/debian/init
ViewVC logotype

Diff of /people/jurij/ipw3945-daemon/debian/init

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7608 by jurij-guest, Fri Oct 13 15:49:57 2006 UTC revision 7609 by jurij-guest, Sat Oct 14 04:11:49 2006 UTC
# Line 11  Line 11 
11  #                    for operation of Intel/PRO Wireless 3945ABG cards  #                    for operation of Intel/PRO Wireless 3945ABG cards
12  ### END INIT INFO  ### END INIT INFO
13    
14    . /lib/lsb/init-functions
15    
16  DAEMON_RUN='yes'  DAEMON_RUN='yes'
17  DAEMON_OWNER='Debian-ipw3945d:Debian-ipw3945d'  DAEMON_OWNER='Debian-ipw3945d:Debian-ipw3945d'
18  DAEMON_BINARY='/sbin/ipw3945d'  DAEMON_BINARY='/sbin/ipw3945d'
# Line 24  fi Line 26  fi
26  start_daemon() {  start_daemon() {
27    cmd="$(echo /sys/bus/pci/drivers/ipw3945/*/cmd)"    cmd="$(echo /sys/bus/pci/drivers/ipw3945/*/cmd)"
28    if [ -z "${cmd}" ]; then    if [ -z "${cmd}" ]; then
29      echo "Not starting regulatory daemon, ipw3945 driver not loaded."      log_warning_msg "Not starting ipw3945 regulatory daemon, driver not loaded."
30    else    else
31      echo -n "Starting ipw3945 regulatory daemon: ipw3945d"      log_daemon_msg "Starting ipw3945 regulatory daemon" "ipw3945d"
32      # Fix permissions      # Fix permissions
33      chown "${DAEMON_OWNER}" ${cmd}      chown "${DAEMON_OWNER}" ${cmd}
34      chmod "${SYS_CMD_PERM}" ${cmd}      chmod "${SYS_CMD_PERM}" ${cmd}
35      start-stop-daemon --start --quiet --chuid "${DAEMON_OWNER}"           \      start-stop-daemon --start --quiet --chuid "${DAEMON_OWNER}"           \
36                        --exec "${DAEMON_BINARY}" --pidfile "${DAEMON_PID}" \                        --exec "${DAEMON_BINARY}" --pidfile "${DAEMON_PID}" \
37                        -- --pid-file=${DAEMON_PID} --quiet                        --oknodo -- --pid-file=${DAEMON_PID} --quiet > /dev/null 2>&1
38      echo "."      code=$?
39        log_end_msg ${code}
40    fi    fi
41  }  }
42    
43  stop_daemon () {  stop_daemon () {
44    echo -n "Stopping ipw3945 regulatory daemon: ipw3945d"    log_daemon_msg "Stopping ipw3945 regulatory daemon" "ipw3945d"
45    start-stop-daemon --stop --quiet --pidfile "${DAEMON_PID}" \    start-stop-daemon --stop --quiet --pidfile "${DAEMON_PID}" \
46                      --signal TERM > /dev/null 2>&1                      --signal TERM > /dev/null 2>&1
47  # Daemon does not remove its own PID file, so we do it  # Daemon does not remove its own PID file, so we do it
48    test -f "${DAEMON_PID}" && rm -f "${DAEMON_PID}"    test -f "${DAEMON_PID}" && rm -f "${DAEMON_PID}"
49    echo "."    log_end_msg 0
50  }  }
51    
52  test -x "${DAEMON_BINARY}" || exit 0  test -x "${DAEMON_BINARY}" || exit 0

Legend:
Removed from v.7608  
changed lines
  Added in v.7609

  ViewVC Help
Powered by ViewVC 1.1.5