[Buildroot] [PATCH 1/1] busybox: udhcpc create leases file
Peter Korsgaard
peter at korsgaard.com
Thu Apr 30 14:59:31 UTC 2015
>>>>> "Matthew" == Matthew Weber <matthew.weber at rockwellcollins.com> writes:
Hi,
>> > + # Based on http://sourceforge.net/p/kboot/mailman/message/1168535/
>>
>> A more detailed commit message would be good. After looking at that URL
>> I'm still not quite sure what this is needed for? It doesn't seem to be
>> read again anywhere.
> Sorry, I can add that. In general, it adds the leases functionality
> that mimics full dhclient behavior. This file can then be used at a
> system level to know least expiration and other server provided
> information.
Ok, good. Is that really something we want to enforce for everyone using
udhcpc with Buildroot?
>>> + } >> /var/lib/misc/udhcpc-$interface.leases
>>
>> Are you sure this should append the file and not overwrite it? Why would
>> you want to keep older lease info around when you receive a new one?
> I just mimic'd dhclient but I could see in a embedded space you might
> only want to keep the latest and when a lease expires, removing this
> file. I think the full client usually used this file to set an
> interface after reboot to the previous lease if one was still valid.
> I wasn't going to keep this behavior since for embedded devices it
> doesn't make sense.
Ok.
>>
>> Perhaps this belongs in a hook in your rootfs overlay?
> Right now there isn't any way to get dhcp lease information after a
> lease is provided. It seemed this should be a standard capability of
> the script. I do agree I should make it not append and clean up when
> there isnt' a lease.
I'm still not convinced this isn't something that belongs in a project
specific rootfs overlay instead. That's part of the reason why we now
support custom hooks in the udhcpc script.
--
Venlig hilsen,
Peter Korsgaard
More information about the buildroot
mailing list