Operating System - HP-UX
1752815 Members
6118 Online
108789 Solutions
New Discussion юеВ

Host name lost during session

 
John Dorak
Advisor

Host name lost during session

Our HP Itanium system: HP-UX ia64bld1 B.11.23 looses its host name after running some build scripts. The scripts do use the hostname command but no changes to the host name are done. I checked file: /etc/rc.config.d/netconf and it has not been changed.

Any ideas?
Thanks,
JJD
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor

Re: Host name lost during session

Hi John:

I suggest you examine the use of the 'hostname' command in the scripts you run. Executing 'hostname name' will change the hostname but not modify the 'netconf' file.

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: Host name lost during session

Given the circumstances as you state them, I can only suggest that it must be divine intervention.


Pete

Pete
Bill Hassell
Honored Contributor

Re: Host name lost during session

What did your hostname become? Was it null or was it something like -v or -h or similar? HP-UX hostname command (unlike Linux and other flavors) has no options whatsoever and takes whatever is supplied on the command line as the new hostname (the hostname man page is helpful here). Either your build scripts were not designed/tested for HP-UX or some novice sysadmin logged in as root and played with the hostname command assuming that all Unix commands are the same.


Bill Hassell, sysadmin
John Dorak
Advisor

Re: Host name lost during session

Just found the culprit, this script of course is used on multiple Unix systems and an error path we don't normally go down had a hostname -s in it.

Thanks for the pointers.

Regards,
JJD
Juan M Leon
Trusted Contributor

Re: Host name lost during session

I guess someone intended to use uname -s to get the hostname.
John Dorak
Advisor

Re: Host name lost during session

Exactly.
rariasn
Honored Contributor

Re: Host name lost during session

Hi,

$ uname -a

rgs,