Current-Users archive

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

Re: dhcpcd(8) and automatic hostname



Hi

On 01/05/2012 5:05, Toru Nishimura wrote:
I've switched dhclient(8) to dhcpcd(8).  The transition was flawless
except of the issue.   My /etc/rc.conf does not set hostname variable
to let it determined by dhclient(8).  It worked well for me so far,
but
dhcpcd(8) does not any more.  I would like to have the feature to be
added in furture release.

dhcpcd(8) requests the DHCP host_name option by default in dhcpcd.conf(5). The assignment of the hostname follows a similar ruleset as dhclient and can be found in /libexec/dhcpcd-hooks/30-hostname

Depending on the dhcpcd version you have installed, you can query the lease assigned by so

dhcpcd -U bge0

Replace bge0 with the interface dhcpcd worked on. It should show all the options received by dhcpcd that it can translate into useable shell variables.
This will include the hostname.

Thanks

Roy


Home | Main Index | Thread Index | Old Index