udhcpd is not terminated correctly in the init script, looses leases, needs SIGUSR1 before SIGTERM

Bug #1075104 reported by Stephan Holtwisch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
busybox (Ubuntu)
New
Undecided
Unassigned

Bug Description

udhcpd keeps track of leases in /var/lib/misc/udhcpd.leases .

Such a file is needed for a dhcpd server to keep track of what leases have been given out in case of a restart of the process.

udhcpd does not write the file on SIGTERM, it writes the file on receiving SIGUSR1.

udhcpd is usually stopped and restarted via the init script which invokes start-stop-daemon. The default --stop signal is SIGTERM. This is also the case with udhcpd, which means that on stops and restarts the leases are not written. I modified the init script by adding a line with SIGUSR1, which works for me, but maybe there is a more elegant solution. Essentially udhcpd needs to receive SIGUSR1 before SIGTERM.

  stop)
        echo -n "Stopping $DESC: "
        start-stop-daemon --stop --verbose --pidfile /var/run/$NAME.pid \
                --oknodo --signal USR1 --exec $DAEMON
        start-stop-daemon --stop --verbose --pidfile /var/run/$NAME.pid \
                --oknodo --exec $DAEMON
        echo "$NAME."
        ;;

Revision history for this message
Stephan Holtwisch (stephan-holtwisch) wrote :

running ubuntu 12.04 LTS

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.