Re: Hook events on timeout
Roy Marples
Sun Oct 20 10:16:41 2019
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