- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- hard coding hostname for an application
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
Forums
Discussions
Discussions
Discussions
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
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
07-07-2004 04:09 AM
07-07-2004 04:09 AM
Could you please educate me ,what does it mean
hardcoding an ip or hostname for an application.
Thanks for your time.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2004 04:12 AM
07-07-2004 04:12 AM
Re: hard coding hostname for an application
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2004 04:16 AM
07-07-2004 04:16 AM
Re: hard coding hostname for an application
In that case have you looked at i4admin?? man i4admin, you can bind application to run on specific host only. Rather to a cpu.
hostname can be changed, so you will have to change the application also.
man i4admin and reated commands.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2004 04:16 AM
07-07-2004 04:16 AM
SolutionHOST="navinhost"
if [[ "$HOST" = "navinhost" ]]
then
..
fi
In the above example you are basically hardcording the hostname.
HOST=$(hostname)
if [[ "$HOST" = "navinhost" ]]
The above excerpt is preferred over hardcoding for couple of reasons
1) easily portable -you can use the same code in more than one machine without any need to edit and customize the code for specific nodes
2) any changes to the system that could effect the inputs to the application would not mean you have to rewrite the application - In the above ex, if you have hardcoded the hostname, whenever the hostname is changed, then you have to edit and make changes to the code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2004 04:18 AM
07-07-2004 04:18 AM
Re: hard coding hostname for an application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2004 04:20 AM
07-07-2004 04:20 AM
Re: hard coding hostname for an application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2004 06:26 AM
07-07-2004 06:26 AM