Operating System - HP-UX
1833847 Members
2162 Online
110063 Solutions
New Discussion

Re: Full domain/host name

 
SOLVED
Go to solution
Christian Fink
Occasional Contributor

Full domain/host name

We recently had to reboot one of our K class servers under HP-UX 11.0
When the machine came back, it cold not find it's own domain name.
Usually the hostnmae is something like:
machine.dom1.dom2. But only the machine part was visible. We then restored all system files and without rebooting the machine, the full name was back.
Question: Where is it stored? (It's not the /etc/hosts file nor /etc/rc.config.d/netconf)

Thanks for any hint.
7 REPLIES 7
Andrew Lartey
Advisor
Solution

Re: Full domain/host name

/etc/resolv.conf
federico_3
Honored Contributor

Re: Full domain/host name




/etc/resolv.conf !


Federico
Andreas Voss
Honored Contributor

Re: Full domain/host name

Hi,

perhaps the name is retrieved by an DNS server which has to be listed in the file /etc/resolv.conf (nameserver)

Regards
Christian Fink
Occasional Contributor

Re: Full domain/host name

Thanks a lot for your immediate answers.
I found in my notes, that /etc/resolv.conf
existed and contained the domain name.
Question: Are there other "static" files
which could have caused the problem?

Regards. Rene
John Palmer
Honored Contributor

Re: Full domain/host name

Certainly /etc/resolv.conf can contain the 'domain name' but according to the man pages it doesn't influence the 'hostname' command.

The 'hostname' is set by calling 'hostname ' or the C library call 'sethostname'.
This will be done at boot time by /sbin/init.d/hostname which does indeed source the name from /etc/rc.config.d/netconf

When you say that you 'restored all the system files' what did you do exactly?
Christian Fink
Occasional Contributor

Re: Full domain/host name

Hi John.
We produce once per month an "ignite" recovery. It contains all files of / and
/usr filesystems.
instead of rebooting the machine from the tape, we did a tar to restore all these
files. When this job had terminated, all programs recognized the full nodename as machine.dom1.dom2
So it cannot be a dynamical assignment from one of the scripts in /sbin/init.d
John Palmer
Honored Contributor

Re: Full domain/host name

That behaviour would be explained by /etc/resolv.conf.

I misinterpreted your original post and thought you were referring to the output from the 'hostname' command rather than how programs recognised their domain.

You can get the same effect without /etc/resolv.conf by defining a fully qualified hostname in /etc/rc.config.d/netconf.

Regards,
John