Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2008 01:28 PM
тАО09-09-2008 01:28 PM
man hostname shown that /sbin/init.d/hostname
would set the hostname parameter on hpux 11.31
but when i do echo $ HOSTNAME
i get this error,
sh: HOSTNAME: Parameter not set
then i have to set hostname in /etc/profile
to get hostname from echo command.
does anyone know why.
Thanks in advance.
Tom
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2008 01:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2008 01:42 PM
тАО09-09-2008 01:42 PM
Re: HOSTNAME
The 'HOSTNAME' variable is defined and editted in '/etc/rc.config.d/netconf'. It is established in '/sbin/init.d/hostname'.
If you want to use it in a script, reference it as:
# echo $(hostname)
Or:
# ME=$(hostname); echo "I am at '${ME}'"
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2008 05:25 PM
тАО09-09-2008 05:25 PM
Re: HOSTNAME
If you really need HOSTNAME set, do it in /etc/profile:
export HOSTNAME=$(hostname)
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2008 06:01 PM
тАО09-09-2008 06:01 PM
Re: HOSTNAME
#hostname
if not set then run the command
#set_parms host_name
otherwise follow the instruction listed above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2008 11:32 PM
тАО09-09-2008 11:32 PM
Re: HOSTNAME
Regards,