[CentOS] DHCP_HOSTNAME in ifcfg-eth0

Fri Dec 2 11:25:56 UTC 2011
Александр Кириллов <nevis2us at infoline.su>

> Sorry for the wrong wording: what I want is the DHCP client to send 
> the
> hostname when a lease is requested, but I do not want to give 
> dhclient
> any explicit hostname to be sent.
>
> I want dhclient to read the hostname from `hostname` or from
> /etc/sysconfig/network or any other way, and use that name to send 
> the
> hostname to DHCP server.

 DHCP_HOSTNAME=$(hostname -s)