If your trying to make CentOS/Fedora boxes to get hostname remember you need to have localhost.localdomain in /etc/sysconfig/network.<br>HOSTNAME=localhost.localdomain<br><br>see around line 252-261<br>/etc/sysconfig/network-scripts/network-functions<br>
need_hostname ()<br>{<br> CHECK_HOSTNAME=`hostname`<br> if [ "$CHECK_HOSTNAME" = "(none)" -o "$CHECK_HOSTNAME" = "localhost" -o \<br> "$CHECK_HOSTNAME" = "localhost.localdomain" ]; then<br>
return 0<br> else<br> return 1<br> fi<br>}<br><br><br clear="all">______________________________<br>Andreas Pedersen<br>
<br><br><div class="gmail_quote">On Sun, Jun 28, 2009 at 11:35 PM, Rob Townley <span dir="ltr"><<a href="mailto:rob.townley@gmail.com">rob.townley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
# i do NOT have any kind of use-host-decl-names on; entry. Do you use<br>
dnsmasq or dhcpd?<br>
# /etc/dhcpd.conf Not sure if a dnsmasq entry would be the same anymore.<br>
<div class="im">host babasse {<br>
hardware ethernet 00:0d:61:ae:6b:8f;<br>
fixed-address 192.168.1.249;<br>
</div> option host-name<br>
"PutClientHostNameHereNotSureIfItHasToBeSameAsAbove-babasse";<br>
}<br>
<br>
#Don't remember what happens when a linux client machine has already<br>
been configured.<br>
#But know for a fact that all pxe booted and live linux booted and<br>
Windows Vista and WinXP<br>
#machines use the hostname from the dhcpd entry.<br>
<div><div></div><div class="h5"><br>
On Sun, Jun 28, 2009 at 10:38 AM, Niki Kovacs<<a href="mailto:contact@kikinovak.net">contact@kikinovak.net</a>> wrote:<br>
> Hi.<br>
><br>
> I just setup one of my machines as a DHCP server. I'd like it to handle<br>
> the hostnames of clients. Don't know if this is an orthodox thing to do<br>
> (feel free to add your comments :oD). Here's the server's relevant lines<br>
> of dhcpd.conf:<br>
><br>
> --8<-------<br>
> ...<br>
> # Envoyer les noms d'hôtes aux clients<br>
> use-host-decl-names on;<br>
><br>
> # Adresses statiques<br>
> host babasse {<br>
> hardware ethernet 00:0d:61:ae:6b:8f;<br>
> fixed-address 192.168.1.249;<br>
> }<br>
> --8<-------<br>
><br>
> Now the question is: how should the configuration look like on the<br>
> client side, so the hostname gets effetively fetched from the DHCP<br>
> server? During the initial install, I assigned hostnames manually to<br>
> every machine.<br>
><br>
> Cheers,<br>
><br>
> Niki Kovacs<br>
> _______________________________________________<br>
> CentOS mailing list<br>
> <a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
> <a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
><br>
_______________________________________________<br>
CentOS mailing list<br>
<a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
</div></div></blockquote></div><br>