Bugzilla – Bug 144324
No hostname in dhc/DNS setup
Last modified: 2006-01-27 15:42:10 UTC
I did an standard installation of SL10.1 I changed /etc/sysconfig/network/config NETWORKMANAGER=yes and restart the network I got an IP address on eth0 and I have a working DNS setup $> nslookup <my_ip> client.ay.test Now I have this: $> hostname linux $> hostname -d unknown host: .... In /etc/HOSTNAME was the entry "linux.site" /etc/hosts looks like this: # # hosts This file describes a number of hostname-to-address # mappings for the TCP/IP subsystem. It is mostly # used at boot time, when no name servers are running. # On small systems, this file can be used instead of a # "named" name server. # Syntax: # # IP-Address Full-Qualified-Hostname Short-Hostname # 127.0.0.1 localhost # special IPv6 addresses ::1 localhost ipv6-localhost ipv6-loopback fe00::0 ipv6-localnet ff00::0 ipv6-mcastprefix ff02::1 ipv6-allnodes ff02::2 ipv6-allrouters ff02::3 ipv6-allhosts
*** This bug has been marked as a duplicate of 116466 ***
This is not a duplicate of bug 116466. This bug is about setting hostname at all. bug 116466 is about reloading syslog after hostname was changed. I'm just working on all that.
Submitted NM today that respects DHCLIENT_SET_HOSTNAME in /etc/sysconfig/network/dhcp.
With Beta2 we properly set the hostname if * DHCLIENT_SET_HOSTNAME is yes * DHCP server supplied a hostname We do not yet set the hostname if * DHCLIENT_SET_HOSTNAME is yes * DHCP server did _not_ supply a hostname This is still required, Stefan just told me that he has prepared a patch. Looking forward to seeing this working aswell. Stefan, can you please take care? Please pass the patch to Robert and me sometime soon. I'd love to see this working in Beta3. Moving to Beta2.
Here's the patch. It works finde on my machine. Timo, Robert, please review.
Created attachment 65118 [details] hostname via dns patch
Thanks, Stefan. Patch looks good to me. Will give it a try tomorrow.
Doesn't only look good, it also works like a charm. I'll attach the patch with some coding style fixes; no functional changes. Robert, if agree with the patch, can you please take care to get this into NM CVS and Beta3? Thanks!
Created attachment 65380 [details] same patch, new style
Checked into CVS and submitted to autobuild.