- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- DHCP cleint enabled, but hostame not set properly
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
04-18-2002 01:38 AM
04-18-2002 01:38 AM
On reboot it obtains a lease from my ISP. It is given the hostname dhcp-4-51.
uname -a shows the hostname as unknown and when I start CDE via reflections it says welcome to unknown.
On Solaris I added an rc script to reset the hostname and all was well. Is there something similar I can do on HPUX 11.00?
maybe I need an rc script with uname -S or hostname?
Many thanks,
Dave.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2002 01:43 AM
04-18-2002 01:43 AM
Re: DHCP cleint enabled, but hostame not set properly
Use set_parms to set your hostname.
C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2002 01:45 AM
04-18-2002 01:45 AM
Re: DHCP cleint enabled, but hostame not set properly
sorry, the systems gets a new hostname every time I guess.
So not a correct answer.
C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2002 01:45 AM
04-18-2002 01:45 AM
Re: DHCP cleint enabled, but hostame not set properly
If I do auto_parms kindly updates /etc/rc.config.d/netconf and /etc/hosts on boot back to the dhcp-4-51 hostname.
What I really want is to keep my hostname as "raver" and ignore what my ISP gives me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2002 01:48 AM
04-18-2002 01:48 AM
Re: DHCP cleint enabled, but hostame not set properly
allright my first impresion was OK.
Use set_parms to set the hostname.
Yes reboot.
C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2002 01:51 AM
04-18-2002 01:51 AM
SolutionUse /etc/rc.config.d/netconf and specify under:
HOSTNAME="xyz"
Alternatively, set uname -S hostname right at the end of /sbin/rc1.d/S320hostname:
uname -S xyz
For more details, take a look at /sbin/rc1.d/S320hostname. You can't use set_parms because it prompts interactively.
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2002 04:53 AM
04-18-2002 04:53 AM
Re: DHCP cleint enabled, but hostame not set properly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2002 05:22 AM
04-18-2002 05:22 AM
Re: DHCP cleint enabled, but hostame not set properly
Just another note, if you are going to change the hostname in a script after auto_parms has run, you should make sure that your hostname is resolvable properly otherwise you'll have no end of trouble. So, make sure your script also updates the appropriate /etc/hosts entry with the IP address supplied by DHCP, and that nsswitch.conf is configured to look at hosts before DNS.
Regards,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2002 12:37 AM
04-19-2002 12:37 AM
Re: DHCP cleint enabled, but hostame not set properly
Thanks for all your help,
Dave.
#!/sbin/sh # # @(#) $Revision: 1.0 Dave Burgess 18/04/2002$
#
# /sbin/rc1.d/S321sethostname
# /sbin/auto_parms sets up the dhcp client. Unfortunately ISP's can set the
# hostname for us. In this case it is set to dhcp-4-51.
# This script resets the hostname to raver.
new_hostname="raver"
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
echo "Resetting dhcp set hostname to $new_hostname"
uname -S $new_hostname
cp -p /etc/hosts /tmp/hosts.boot
cat /tmp/hosts.boot | sed s/dhcp-4-51/$new_hostname/g > /etc/hosts
cp -p /etc/rc.config.d/netconf /tmp/netconf.boot
cat /tmp/netconf.boot | sed s/dhcp-4-51/$new_hostname/g > /etc/rc.config.d/netconf