Monday, January 20, 2014

Change Hostname on Solaris 10

1. create a file /etc/init.d/set_hostname with below content

HOSTNAME=`cat /etc/nodename`

echo "Setting hostname to $HOSTNAME...  \c"
uname -S $HOSTNAME
echo "Done."

2. create a symbolic link as /etc/rc2.d/S70set_hostname
ln -s /etc/init.d/set_hostname /etc/rc2.d/S70set_hostname


No comments:

Post a Comment