Re: Re: Selecting a "better" offer from two DHCP servers
Shahid Mahmood
Tue Jun 21 13:01:12 2016
On Mon, Jun 20, 2016 at 4:51 PM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
> On 2016-06-20 21:45, Shahid Mahmood wrote:
>
>> On Mon, Jun 20, 2016 at 4:34 PM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
>>
>> On 2016-06-20 18:00, Shahid Mahmood wrote:
>>>
>>> Turns out the output is sent to syslog and is not parsable after
>>>> it is
>>>> mixed with tons of other logs.
>>>>
>>>> Can we force the logs to go somewhere else? (not to syslog)
>>>>
>>>
>>> There is the logfile option.
>>>
>>
>> Indeed there is '--logfile=<filename>'. Is it documented?
>>
>> Cant seem to find it.
>>
>
>
> dhcpcd(8) mentions it.
>
> Roy
>
Turns out monitoring logfile has it side effects. I need to trim it
occasionally so it doesn't keep on growing.
I will resort to detecting 'BOUND' event now. Here is the flow:
- Start dhcpcd with '-Q site_specific'
- Watch the hook events for up to 5(?) seconds
- If 'BOUND' event was not received within this time, restart dhcpcd
without -Q. Otherwise, keep going.
Still ugly, but should do the trick. It could have been faster if we had a
hook script event on 'DISCOVER'.
I wish there was an option: "--defer-for-option <option> <delay>". This
would be the closest alternative to that proposed 'merge leases' feature.
-shahid
Archive administrator: postmaster@marples.name