Package: ipw3945d
Version: 1.7.22-2

On bootup the daemon is started by modprobe when the ipw3945 module is loaded. A few seconds later the daemon is started again from /etc/init.d/ipw3945d. The strange thing is the daemon is in fact started twice. As there are 2 daemons fighting for the same card, the network is not functioning.


[EMAIL PROTECTED]:~$ grep ipw3945 /var/log/boot
Mon Dec  4 12:26:12 2006: Loading kernel module ipw3945.
Mon Dec  4 12:26:12 2006: Starting ipw3945 regulatory daemon: ipw3945d.
Mon Dec  4 12:26:15 2006: Starting ipw3945 regulatory daemon: ipw3945d.

[EMAIL PROTECTED]:~$ ps -ef | grep ipw3945d
108 3667 1 0 12:26 ? 00:00:00 /sbin/ipw3945d --pid-file=/var/run/ipw3945d/ipw3945d.pid --quiet --log-file=/var/log/ipw3945d/ipw3945d.log 108 4086 1 0 12:26 ? 00:00:00 /sbin/ipw3945d --pid-file=/var/run/ipw3945d/ipw3945d.pid --quiet --log-file=/var/log/ipw3945d/ipw3945d.log

[EMAIL PROTECTED]:~$ head /var/log/ipw3945d/ipw3945d.log
2006-12-04 13:18:47: WARNING: Unhandled command response: #11
2006-12-04 13:19:47: ERROR: Setting UNINIT state failed.
2006-12-04 13:19:48: WARNING: Unhandled command response: #11
2006-12-04 13:19:54: WARNING: Filter Calibration failed at step 0.
2006-12-04 13:19:54: ERROR: Calibration sequence failed. Going back to UNINIT.
...


I tried adding

if test -e "${DAEMON_PID_FILE}"; then...

to the start_daemon() section of /etc/init.d/ipw3945d, but this did not work as the pid file was not yet written when the daemon was started the second time. The start-stop-daemon process is probably still running at that time, but not yet ipw3945d.

It works with a pgrep though (also matches the start-stop-daemon process i guess). So this does the trick:

start_daemon() {
  if have_sys_entries; then
    remove_stale_pid
    if pgrep ipw3945d; then
    log_warning_msg "ipw3945d already starting!!"
    else
        log_daemon_msg "Starting ipw3945 regulatory daemon" "ipw3945d"
start-stop-daemon --start --quiet --chuid "${DAEMON_OWNER}" \ --exec "${DAEMON_BINARY}" --pidfile "${DAEMON_PID_FILE}" \ --oknodo -- --pid-file=${DAEMON_PID_FILE} --quiet \
                          --log-file=${DAEMON_LOG_FILE} > /dev/null 2>&1
        code=$?
        log_end_msg ${code}
        sleep 1
    fi
  else
log_warning_msg "Not starting ipw3945 regulatory daemon, driver not loaded."
  fi
}





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to