On 2022-08-18 20:34 UTC, Klemens Nanni <k...@openbsd.org> wrote:
> On Thu, Aug 18, 2022 at 08:53:51PM +0100, Jason McIntyre wrote:
>> On Thu, Aug 18, 2022 at 07:29:42PM +0000, Klemens Nanni wrote:
>> > There is dhcpleasectl(8) -l but that only works for currently
>> > configured leases/interfaces and does not print all information
>> > contained in the lease file (mostly tailored to fit the installer's
>> > needs).
>> > 
>> > Feedback? OK?
>> > 
>> 
>> hi.
>> 
>> - in general i like this. i didn;t know about it, and am currently
>>   having to run dhcpleasectl to get the info (and generating a temp
>>   file so a script can read it!)
>> 
>> - when you say dhcpleasectl only works "for currently configured
>>   leases/interfaces" how does this differ? you mean it shows you the
>>   last lease, even if one is not currently in use?
>
> Lease file stay behind until manually removed or overwritten with fresh
> leases, so you need to know what's what when parsing them:
>       $ ls /var/db/dhcpleased/
>       athn0    cdce0    em0      trunk0   urndis0
>
> For example, there is no cdce0 or urndis0 right now on my box, those are
> from past tethering situations and those lease files are useless now.

They are used when cdce0 or urndis0 come back and made autoconf
interfaces. dhcpleased then goes throught the REBOOTING state, which is
faster and gives you your old IP back, if available.
So I don't think "useless" is the right word in the general case.

-- 
I'm not entirely sure you are real.

Reply via email to