Setting the hostname?
- From: Howard Chu <hyc symas com>
- To: networkmanager-list gnome org
- Subject: Setting the hostname?
- Date: Thu, 25 Sep 2008 05:23:17 -0700
I just updated my build tree from svn and I see that NetworkManager now tries 
to set the machine's hostname based on info various plugins may provide. This 
caused quite a bit of confusion here on my Ubuntu laptop - the hostname that 
was set by init during boot was used in the getty prompt, but shortly after my 
X session started, it changed to localhost.localdomain. X clients that were 
started after the hostname changed no longer had permission to talk to the X 
server, and so silently failed to launch, and a lot of cursing and swearing 
followed shortly thereafter.
I realize there are a lot of different use cases being targeted here, but I 
don't believe that overriding a non-NULL current hostname is a good behavior. 
Maybe it's ok if the current hostname is "localhost" but there aren't a lot of 
other situations where overriding would be the correct action.
Along similar lines, it's not always correct to accept a domain name from DHCP 
and stuff it into the local resolv.conf. I can see it in one use case, e.g. in 
a large network of non-mobile machines, where you really do want to just plug 
in the box and let it self-configure. But again, for a laptop that's used in 
multiple locations, it's incorrect. My laptop is part of my "symas.com" 
domain, no matter whose network I plug it into - office, the wifi at the 
coffee shop, a friend's house, wherever.
This is another reason why supporting dnsmasq over DBUS is superior to using 
the resolvconf package - it leaves /etc/resolv.conf configured exactly as I 
set it, so I get consistent name lookups no matter where I am. It also 
obviates the need for most of the /etc/ppp/ip-{up,down} scripts too, for the 
same reasons.
--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]