dhcpcd-discuss

Re: Terminating 'dhcpcd' From a Hook Script

Roy Marples

Thu Jun 15 16:44:29 2017

On 15/06/2017 17:43, David Hauck wrote:
> Hi Roy,
>  
> On Thursday, June 15, 2017 9:16 AM, Roy Marples wrote:
>> On 15/06/2017 17:13, David Hauck wrote:
>>> So in my case I would then need to invoke: 'dhcpcd -4 -x eth0'? Would this terminate (and not de-
>> configure) the proper IPv4 invocation of 'dhcpcd' on eth0?
>>
>> Exactly so.
> 
> This doesn't seem to be working for me (or it's at least not doing what I want it to do - specifically, terminate 'dhcpcd' without de-configuring the interface).
> 
> I see my hook script invoke 'dhcpcd -4 eth0' on the BOUND reason. And I see the following in syslog as a result:
> 
> 20170615 09:32:22.864 info daemon(dhcpcd-run-hooks):eth0: 60-xxxx: received reason=BOUND
> 20170615 09:32:23.020 info daemon(dhcpcd-run-hooks):eth0: 60-xxxx: terminating 'dhcpcd -4 eth0'
> 20170615 09:32:23.027 info daemon(dhcpcd):sending commands to master dhcpcd process
> 20170615 09:32:23.031 info daemon(dhcpcd):control command: dhcpcd -4 -x eth0
> 20170615 09:32:23.031 info daemon(dhcpcd):eth0: removing interface
> 20170615 09:32:23.031 info daemon(dhcpcd):eth0: deleting default route via 205.159.216.130
> 20170615 09:32:23.031 info daemon(dhcpcd):eth0: deleting route to 205.159.216.128/25
> 20170615 09:32:23.036 info daemon(dhcpcd):forked to background, child pid 2277
> 20170615 09:32:23.045 info daemon(dhcpcd-run-hooks):eth0: 60-xxxx: received reason=STOP
> 20170615 09:32:23.054 info daemon(dhcpcd-run-hooks):eth0: 60-xxxx: received reason=STOPPED
> 
> This is with 'master' in the configuration file (without master the attempt to call 'dhcpcd -x' times out). The problem here is that I don't want this termination to result in the interface being de-configured. So, is there a way around this?

Add the word `persistent` to dhcpcd.conf
It's there by default.

Roy

Follow-Ups:
RE: Terminating 'dhcpcd' From a Hook ScriptDavid Hauck
References:
Terminating 'dhcpcd' From a Hook ScriptDavid Hauck
Re: Terminating 'dhcpcd' From a Hook ScriptRoy Marples
RE: Terminating 'dhcpcd' From a Hook ScriptDavid Hauck
Re: Terminating 'dhcpcd' From a Hook ScriptRoy Marples
RE: Terminating 'dhcpcd' From a Hook ScriptDavid Hauck
Re: Terminating 'dhcpcd' From a Hook ScriptRoy Marples
RE: Terminating 'dhcpcd' From a Hook ScriptDavid Hauck
Archive administrator: postmaster@marples.name