[arch-general] Setting Computer Hostname via DHCP Server
29 Sep
2011
29 Sep
'11
12:37 a.m.
Hello,
I was wondering if it is possible to have archlinux set it's hostname based on what the DHCP server tells it is? As I noticed while using a CentOS Server, that it does do this by default.
Thanks for pointing me in the right direction on enabling this, as I searched around and was unable to find anything.
Thanks for your time,
Tom
29 Sep
29 Sep
6:54 a.m.
dhcpcd should do this automatically. From dhcpcd(8):
If the hostname is currently blank, (null) or localhost, or force_hostname is YES or TRUE or 1 then dhcpcd sets the hostname to the one supplied by the DHCP server.
It seems to work for me. If you're setting the hostname manually in /etc/rc.conf, then you'll either need to remove that or run dhcpcd with `-e force_hostname=TRUE` to override it.
4448
Age (days ago)
4448
Last active (days ago)
1 comments
2 participants
participants (2)
-
Taylor Hedberg
-
Thomas Misilo