NSLU2-Linux
view · edit · print · history

You may experience cases where some optware daemons fail to start on reboot.

One cause is when the daemon believes that another instance of itself is already running.

This can happen when the daemon records the fact that it is running in a .pid file. If there isn't a clean shutdown, the .pid file may not be deleted/cleared. On reboot, if the same pid has be allocated to some process that is running, the new daemon gets confused and exits to prevent interference with this ghost process.

/etc/rc.d/rc.sysinit handles this for the linksys utilities. However, nothing does it for the optware packages. dhcpd often falls into this trap on my systems.

Hopefully, someone will fix this in a future unslung release. But until then, the following diversion script will help:

/unslung/rc.sysinit

 
# Diversion script at sysinit time
#
# Return 1 to continue standard script
#
# Clean up /opt/var/run to prevent stale pid info from breaking startups.
#
find /opt/var/run -name '*.pid' -exec rm -f {} \;

return 1

enjoy,

    --tlhackque
view · edit · print · history · Last edited by tlhackque.
Originally by tlhackque.
Page last modified on March 27, 2008, at 09:16 PM