Operating System - HP-UX
1753533 Members
5125 Online
108795 Solutions
New Discussion юеВ

Re: hostname change to -f after run script

 
SOLVED
Go to solution
mohdamir
Frequent Advisor

hostname change to -f after run script

Hi gurus,
My servers change their hostname to -f after I ran one script as attached. May I know why?
7 REPLIES 7
Michael Mike Reaser
Valued Contributor
Solution

Re: hostname change to -f after run script

man 1 hostname

Several places in this script, the command "hostname -f" is issued. The HP-UX hostname(1) command has no options, so (presuming you ran this script as root), you would have just set your hostname to "-f".
There's no place like 127.0.0.1

HP-Server-Literate since 1979
mohdamir
Frequent Advisor

Re: hostname change to -f after run script

Never thought about that. Thanks a lot :)
Patrick Wallek
Honored Contributor

Re: hostname change to -f after run script

It looks like you're running the cfg2html script that was built for LINUX on your HP-UX boxes. DON'T DO THIS!!!!!!

Go find the CFG2HTML that was built for HP-UX. If you do that you should not have this problem. I've been running CFG2HTML on HP-UX for years and haven't yet had the problem you describe.
mohdamir
Frequent Advisor

Re: hostname change to -f after run script

Thanks for the reminder :) Can u share the script for HP-UX?
AnthonySN
Respected Contributor

Re: hostname change to -f after run script

there are variuos sites you can download it from, one of them is given below
http://www.cfg2html.com/
Bill Hassell
Honored Contributor

Re: hostname change to -f after run script

cfg2html is an excellent collection of system inventory tools, but every 'Unix' system is very different. And even within the same flavor (ie, HP-UX), there are forward and backward compatibility issues. Always use the latest cfg2html for the OS you are running. For HP-UX, there are two major versions:

cfg2html_hpux_3.76-20100805.depot

cfg2html_hpux_4.84-20100809-24814.depot

Version 3 is for 11.00 and earlier. Version 4 is for 11.11 and higher.

For AIX, Solaris, Linux, etc, be sure to read the comments at the cfg2html Yahoo site for details.


Bill Hassell, sysadmin
mohdamir
Frequent Advisor

Re: hostname change to -f after run script

Thanks all for your reply :)