dhclient: Using dhcp-lease-time in expressions
jr-list-2011 at quo.to
Sun Dec 18 07:43:07 UTC 2011
On 12/16/2011 12:40 AM, Glenn Satchell wrote:
> You're stuck in a chicken and egg situation here. When you send out the
> initial DHCPDISCOVER, there is no lease-time assigned yet, so the value is
> undefined and causes the expression to fail.
FWIW, I have an active lease, so I'm seeing a broadcast DHCPREQUEST
followed by a DHCPACK.
The "leased_lease: not available" message is actually logged *after* the
DHCPACK message. So it seems that dhclient ought to already have the
server options in hand at the time the expression is evaluated/failing.
I wonder if this "leased_lease" construct simply does not exist until
the lease is finalized, making lease-time unusable from any expression
evaluated at DHCPACK time?
> Looking at the dhcp-eval man page you could wrap this with "if exists".
> Although that says it wants an option it may also work with lease-time.
Will give that a shot, and see if log() yields any clues...
More information about the dhcp-users