On 03/31/2011 07:28 PM, Dan Williams wrote: > On Sun, 2011-03-27 at 17:57 +0200, Ralf Corsepius wrote: >> On 03/27/2011 05:27 PM, Chuck Anderson wrote: >>> On Sun, Mar 27, 2011 at 03:58:06PM +0200, Ralf Ertzinger wrote: >>>> Hi. >>>> >>>> On Sun, 27 Mar 2011 15:48:14 +0200, Kevin Kofler wrote >>>>> NM supports static IPs these days. So I think that rather than >>>>> hacking around NM, you should just fix the IP inside NM's >>>>> configuration and have NM work FOR you rather than AGAINST you. >>>> >>>> I'm sorry, but by the time I have clicked through the GUI to do >>>> that I have configured the interface via ip, did what I wanted to >>>> do and unconfigured the interface again. >>>> >>>> I uncheck "Enable networking" in nm-applet before doing that, >>>> and for me that makes NM keep it's grubby paws off my manually >>>> configured interface, so I'm not complaining. >>> >>> You don't need to use the GUI. Just edit >>> /etc/sysconfig/network-scripts/ifcfg-* with a static IP and NM will >>> pick it up right away and configure it. >> >> And how to tweak /etc/sysconfig/network-scripts/ifcfg-* (and/or >> /etc/sysconfig/network) for static IPs such that NM sets >> hostname/domainname correctly? > Let me try to provide more details: Given a small (3 machines), wired (No WLAN, no VPN), static network without dhcp and static IPs only, on a subnet of a larger network (provides DNS), which is supposed to appear on a (private) domain of its own (It's a lab's network). When adding a Fedora machine, * with the "network" scripts it was possibile to assign the domainname through /etc/sysconfig/network. - "hostname" returned "<machine>", - "hostname -f" returned "<machine>.<privatedomain>" * with NM, when - using a fqn as hostname in /etc/sysconf/networking-scripts/ifcfg*eth0 (rsp. nm-connection-editor), both "hostname" and "hostname -f" always return the FQDN: "<machine>.<privatedomain>" - using "<machine>" as hostname in /etc/sysconf/networking-scripts/ifcfg*eth0 rsp. nm-connection-editor, "hostname" returns "<machine", while "hostname -f", thoughout the years sometimes returned "<machine>", sometimes an empty string, sometimes "localhost" and sometimes even hung. I don't know the exact causes. We've tried various things, but never could make NM working as desired. In other words, my question is: How to configure NM in a private, dhcp-less, static network, with only static IPs, such that "hostname" returns "<machine>" and "hostname -f" returns "<machine>.<privatedomain>" > domainname is only used for NIS, Hmm, this doesn't match with my understanding. Domainname and ypdomainname are separate things. Domainname is the "domain part" of a "FQDN", while ypdomainname is complete independent from the domainname and may be set to something entirely different than "domainname". > which I assume you're not running. We are using yp/NIS for this private network, but currently are not using it for hostname resolution. > Otherwise, if you have a persistent hostname set > in /etc/sysconfig/network (HOSTNAME=adasdasdf) then NM will respect > that. If you do not have a persistent hostname set, then the hostname > will come from the DHCP server, or if not available from DHCP, from > reverse DNS lookup of your IP address, just as with the 'network' > service. > NM will update your /etc/resolv.conf with various domains taken from > your hostname, so if your hostname is "blah.foobar.com", NM will add > "foobar.com" to the searches in /etc/resolv.conf. > > As has been stated before, NM does not touch /etc/hosts anymore. Could you tell me since when? The machines in question are running F13 ( Ralf -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel