udhcpd is not terminated correctly in the init script, looses leases, needs SIGUSR1 before SIGTERM
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
busybox (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
udhcpd keeps track of leases in /var/lib/
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: "
echo "$NAME."
;;
running ubuntu 12.04 LTS