[opensuse-autoinstall] correct way to set hostname to FQDN in SLES 11 and openSuSE 11.2
Hi, I am using autoyast to install both SLES11 and openSUSE 11.2 hosts. I want all host to use FQDN for hostname, but for unknown reasons, some of them do, and some others only have a short name without domain part. The autoyast.xml file is auto generated for each node, and only FQDN are referenced in there. I have following sections in autoyast.xml (real host name replaced, to protect innocent): <host> <hosts config:type="list"> <hosts_entry> <host_address>127.0.0.1</host_address> <names config:type="list"> <name>localhost </name> </names> </hosts_entry> <hosts_entry> <host_address>10.1.68.86</host_address> <names config:type="list"> <name>myhostname,example.com</name> </names> </hosts_entry> </hosts> </host> and <dns> <domain>example.com</domain> <hostname>myhostname.example.com</hostname> <nameservers config:type="list"> ... </nameservers> <searchlist config:type="list"> ... </searchlist> </dns> I also have following line in /etc/sysctl.conf: kernel.hostname = myhostname.example.com Even after reboot, above sysctl.conf entry doesn't seem to do anything, or some scripts has changed hostname after /etc/init.d/boot.d/S13boot.sysctl script. So my question is how should I set hostname during initial set up ? Thanks, -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Hi,
I am using autoyast to install both SLES11 and openSUSE 11.2 hosts. I want all host to use FQDN for hostname, but for unknown reasons, some of them do, and some others only have a short name without domain part.
What method you're using to find out the hostname? 'hostname -f'? What's the content of /etc/HOSTNAME on the "good" and "bad" hosts?
I have following sections in autoyast.xml (real host name replaced, to protect innocent):
<host> <hosts config:type="list"> ... </hosts> </host>
JFYI, <host> section configures entries of /etc/hosts, it has no influence on FQDN.
and
<dns> <domain>example.com</domain> <hostname>myhostname.example.com</hostname> ^^^^^^^^^^ You may put only short name into <hostname> element. YaST will merge the content of <hostname> and <domain> by itself.
I also have following line in /etc/sysctl.conf:
kernel.hostname = myhostname.example.com
Uh, I believe this is not the right file to put your static hostname into (first time I actually see someone doing it like this). /etc/HOSTNAME is your friend. However, since you're using SLE11 (GA, not SP1 yet) and openSUSE 11.2, you may as well be hit by one of (sadly many) bugs related to AutoYaST and hostname/domain name configuration that got fixed in the meantime - bnc#502715, to mention at least one of them. fB. -- \\\\\ Katarina Machalkova \\\\\\\__o OOo developer __\\\\\\\'/_ & hedgehog painter
participants (2)
-
Katarina Machalkova
-
Yiping Zhang