dhcpcd --exit --persistent only works for manager
Hi Roy,
The following sequence will remove addressess at exit despite the -p option:
$ killall dhcpcd; dhcpcd wlan0; dhcpcd -x -p wlan0
whereas with a manager addressess are left alone as expected:
$ killall dhcpcd; dhcpcd -M wlan0; dhcpcd -x -p wlan0
Seems to me signal sending should be skipped if -p is given, falling back to sending a command to the daemon instead.
--Daniel
I think the issue here is the first sequence is not being run in managed mode, so you're effectively trying to "run" dhcpcd twice instead of sending a command to the previously run instance? So it's just executing the exit, but ignoring any other options.
Are you expecting the first sequence to behave as if it were in managed mode (ie updating the currently running instance)?
Similar to #548 ?
@ColinMcInnes Look more closely at the code (or debug output or strace) please I already root-caused this on my end :-). LMK if you need pointers to the right spots.
The second command in the pairs will always talk to a daemon launched by the first, be that a manager or per-iface daemon. Either through signals or control commands both of which dhcpcd supports already (#ifdef USE_SIGNALS) but when the ifdef is enabled the former will be preferred.
This is merely an inconsidency in the details of that behaviour.
--Daniel