On Wed, Aug 24, 2016 at 12:08 PM, Peter Korsgaard <[email protected]> wrote: > The udhcpc script may be used to setup fallback configuration (E.G. IPv4LL, > fixed IP address, ..) that also needs to be cleaned up on release (E.G. > when SIGUSR2 is called or on shutdown with -R), so unconditionally call > deconfig. > > Signed-off-by: Peter Korsgaard <[email protected]> > --- > networking/udhcp/dhcpc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c > index 8a16e98..799a7f9 100644 > --- a/networking/udhcp/dhcpc.c > +++ b/networking/udhcp/dhcpc.c > @@ -1129,9 +1129,9 @@ static void perform_release(uint32_t server_addr, > uint32_t requested_ip) > bb_error_msg("unicasting a release of %s to %s", > inet_ntoa(temp_addr), buffer); > send_release(server_addr, requested_ip); /* unicast */ > - udhcp_run_script(NULL, "deconfig"); > } > bb_error_msg("entering released state"); > + udhcp_run_script(NULL, "deconfig"); > > change_listen_mode(LISTEN_NONE); > state = RELEASED;
Applied, thanks. However, a more robust solution is to have process babysitter to run some cleanup script. Imagine that udhcpc is killed with SIGKILL. Can't handle that easily inside udhcpc... See examples/var_service/dhcp_if/finish _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
