As Annihilannic stated, the easiest way is to run the sys-unconfig script. It will walk you through all the necessary network and node information. You will not destroy any data.
Back in Solaris7, in order to use dhcp and get around the system being renamed 'unknown' if your dhcp server did not supply a name, we used to 'comment' or remove the following lines in the /etc/init.d/inetsvc file:
hostname=`/sbin/dhcpinfo Hostname`
if [ -z "$hostname" ]; then
hostname="unknown"
fi
-----------------------------------------------------------
Or, you could just change:
hostname ="unknown"
to
hostname ="<your hostname>"
-----------------------------------------------------------
Then reboot again.
This assumes that you have the proper entries in:
/etc/hosts
/etc/hostname.<interface> (ex: /etc/hostname.hme0)
/etc/nodename
I'm pretty sure this also worked in Solaris 8.
If that doesn't work, try this web site for a diff approach:
I've got Solaris 9 (i86 flavour) and found that you have to change the /etc/init.d/network file as this appears to set the hostname first. I did try updating inetsvc but that didn't work.
case "$_INIT_NET_STRATEGY" in
"dhcp" hostname="<your hostname>" ;;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.