Re: Hook events on timeout
Jonas Ramstrand
Tue Oct 22 09:57:46 2019
Cool, looks good. Thanks! Noticed that timeout is not having effect if
forked to background. It's how it should be? No issue for me, just noticed
it.
Br
//Jonas
Den sön 20 okt. 2019 12:19Roy Marples <roy@xxxxxxxxxxxx> skrev:
> Hi Jonas
>
> On 18/10/2019 10:50, Jonas Ramstrand wrote:
> > Hi Roy / list
> >
> > I have a scenario where I want to use required option, but if I don’t
> > get an ACK after 3 times I want to fallback without –require.____
> >
> > Now I’m having a timer in my application to check for a valid lease to
> > exit/restart dhcpcd. But I’ve now implemented to check for hook events
> > in my application. So plan is to use --timeout, but I don’t get any
> > hook-events to use when timed out. I see traces: “timed out” and “dhcpcd
> > exited”, but would expect hook-events “STOPPED” and/or “TIMEOUT”.____
> >
> > Starting with dhcpcd-command “dhcpcd wlan0 --nolink --noipv4ll --timeout
> > 10 --debug --require 43”
>
> Fixed here:
>
> https://roy.marples.name/cgit/dhcpcd.git/commit/?id=12315f84852649f12b79c325e9dc8aed19a4485b
>
> If you intend to restart dhcpcd inside the hook script you'll need to
> fork off a new detached process as dhcpcd will only remove it's lock on
> the pidfile *after* the hook has finished and the dhcpcd process exits.
>
> Roy
>
Archive administrator: postmaster@marples.name