Current-Users archive

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

Re: dhcpcd(8) and automatic hostname

On 01/05/2012 23:42, Toru Nishimura wrote:
Thanks for the detailed reply. I should write my message clearer. The issue
resides in /etc/rc.d/ structure, not dhcpcd(8) functionality itself.

/// short summary ///
When /etc/rc.conf does not have hostname= field, having
ifconfig_fxp0="dhcp" fails to assign hostname.

/// details ///
When /etc/rc.conf has dhclient="YES" and dhclient_flags="fxp0", dhclient
can assign hostname provided by DHCP server.  If /etc/rc.conf has
ifconfig_fxp0="dhcp" replacing the above two lines, /etc/rc emits the
following error message and the machine ends up with no hostname.

Starting Network.
/etc/rc: WARNING: $hostname not set.
Configuring network interface: fxp0
NetBSD/i386 (Amnesiac)  (console)

Observed in 6.0_BETA system.

We should really punt the ifconfig_xxx="dhcp" foo.
You can solve the problem by putting dhcpcd="YES" in /etc/rc.conf instead. There's normally no need to give it any flags.



Home | Main Index | Thread Index | Old Index