Why udhcpd does not write leases file upon
receipt of termination signal? Here's the
code in question (networking/udhcp/udhcpd.c):
switch (udhcp_sp_read(&rfds)) {
case SIGUSR1:
bb_info_msg("Received SIGUSR1");
write_leases();
/* why not just reset the timeout, eh */
timeout_end = monotonic_sec() + server_config.auto_time;
continue;
case SIGTERM:
bb_info_msg("Received SIGTERM");
goto ret0;
case 0: /* no signal: read a packet */
break;
default: /* signal or error (probably EINTR): back to select */
continue;
}
I think there should be a call to write_leases()
right after "Received SIGTERM" message, just like
it is done in SIGUSR1 case?
Ofcourse this makes little sense when UDHCPD_WRITE_LEASES_EARLY
feature is set, but when it does not, there might be quite
several "uncomitted" leases (7200 seconds (by default) is
quite alot).
Thanks,
/mjt
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox