[Sunhelp] (no subject)

blake.r.matheny at mail.sprint.com blake.r.matheny at mail.sprint.com
Tue Oct 17 08:19:21 CDT 2000


--openmail-part-2b3410d8-00000001
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
	;Creation-Date="Tue, 17 Oct 2000 08:19:21 -0500"
Content-Transfer-Encoding: 7bit

In Solaris 8 it's as easy as changing your /etc/init.d/network file. 
Find where it says:
if [ -z "$hostname" ]; then
	hostname=blah
fi
and change the hostname= to hostname="`shcat /etc/nodename`" or 
whatever file holds your name. In Solaris 2.6 I stuck a little script 
in /etc/rc2.d called S25hostname. The file contains the following:
#! /bin/sh
case "$1" in
*)
        # set hostname
        if [ -f /etc/nodename ] ; then
                echo "setting hostname"
                hostname `cat /etc/nodename`
        fi
        ;;
esac
There are probably "official" Sun ways of doing these, but all of the 
methods that people have recommended to me did not work. These do work, 
I use these methods now. Hope that was helpful.
-Blake

-----Original Message-----
From: mjannelli [mailto:mjannelli at tiscalinet.it]
Sent: Tuesday, October 17, 2000 4:16 AM
To: sunhelp
Cc: mjannelli
Subject: [Sunhelp] (no subject)


Hi everyone
I have configured a DHCP client on my machine (with Solaris 2.7) 
creating the files:
hostname.hme0
hostname.hme0:1
dhcp.hme0
dhcp.hme0:1

and using ifconfig command

DHCP works correctly, it assigns an IP address to the machine, it 
writes this line on /etc/hosts file:
<IP address> unknown #added by DHCP

My problem is that i cannot set the hostname. I tried to add the name 
of my host in files hostname.hme0 and hostname.hme0:1 but it does not 
work.

Someone has some ideas?
Thanks a lot.
Bye
Miriam

--
TiscaliNet, libero accesso ad Internet.
http://www.tiscalinet.it

_______________________________________________
SunHELP maillist  -  SunHELP at sunhelp.org
http://www.sunhelp.org/mailman/listinfo/sunhelp

--openmail-part-2b3410d8-00000001--






More information about the SunHELP mailing list