[opensuse] How to set FQDN such that no DNS lookup is performed by hostname -f?
Hi, I try to set a hostname on opensuse 13.2 in a way, that it is - preserved over reboots - hostname -s and hostname -f give answers based on what I set and don't ask DNS What I tried so far: My host is called pc.foo. I use a static IP setup. I put pc.foo in /etc/hostname (=/etc/HOSTNAME) Then hostname -s gives me 'pc', but hostname -f does a dns lookup for pc, which in my network resolves to pc.bar, because 'bar' is in my NETCONFIG_DNS_STATIC_SEARCHLIST. What works is to run 'hostname pc.foo' at boot. But there must be a nicer way to tell wicked which hostname to use. In my opinion it should respect /etc/hostname. Also I don't want to put entries in /etc/hosts as I use a central hosts list in our network where "pc" maps to pc.bar, which should be no issue as long as by machine knows it is pc.foo. Am I missing something? Best, Robin -- ---------------------------------------------------------------------------- Robin Roth Tel.: +49 721 608 43583 Institute for Theoretical Physics Fax: +49 721 608 43582 Karlsruhe Institute of Technology (KIT) Wolfgang Gaede Str.1 D-76131 Karlsruhe e-mail: robin.roth@kit.edu
On 03/23/2015 01:08 PM, Robin Roth wrote:
My host is called pc.foo. I use a static IP setup. I put pc.foo in /etc/hostname (=/etc/HOSTNAME)
You normally use /etc/hosts for this, with a line such as: "127.0.0.1 localhost". -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
James Knott
-
Robin Roth