[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: netcfg: using udhcpc to get dhcp lease fails



Hello Frans,

On Tue, Jan 26, 2010 at 1:33 PM, Frans Pop <elendil@planet.nl> wrote:
> I've just tried running the SVN version of netcfg which includes the
> following change:
>   [ Otavio Salvador ]
>   * Add support for udhcpc. This was based on Luk Claes but changed to
>     avoid dropping support for dhclient, dhclient3 and pump for now.
>
> I built a netboot image without dhcp3-udeb to test udhcpc, but it failed
> miserably as it did not manage to get a lease during netcfg.
> How well was this tested?

It was a long time since I last looked at it; I've looked again and I
found that the script was not being set as executable. I've fixed it
for next busybox' upload.

> It did work when run from a debug shell:
> # ip link set up dev eth0
> # udhcpd
> udhcpd (v1.14.2) started
> Sending discover...
> Sending select for 10.19.66.61
> Lease of 10.19.66.61 obtained, lease time 7200

It works now inside of the installer.

> Another issue is that I could not find a lease file anywhere, which makes
> troubleshooting network issues more difficult.

Now it has one. /var/lib/udhcp/udhcpc.leases.

> It also means that using udhcpd would break setting a preseed file from the
> DHCP server config [1]. And we have had bug reports in the past when that
> no longer worked.

I've looked at busybox' code and netcfg and I've fixed the missing
things that are need for this support (we need to pass bootfile param

> As there was no lease file I could not verify if the "filename" option was
> even included in the lease or not.

I've changed upcoming busybox' script to write a leases file and
changed preseed to use it.

It should work fine.

-- 
Otavio Salvador                  O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854         http://projetos.ossystems.com.br


Reply to: