[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Hostname "Chicken and Egg"
- From: Bob Kinney <bc98kinney yahoo com>
- To: Redhat-install-list redhat com
- Cc:
- Subject: Hostname "Chicken and Egg"
- Date: Thu, 16 Dec 2004 15:01:55 -0800 (PST)
Happy Holidays all--
I'm running RH9, and recently switched from being directly connected to
the internet (dhcp giving me a publicly routed address) to being behind
a router.
I reconfigured my IP address to be a static, private one now, and my
hostname now comes up as "localhost.localdomain". I'm trying to name the
host "vectra".
Looking at the man page for hostname, it says that:
" The host name is usually set once at system startup in
/etc/rc.d/rc.inet1 or /etc/init.d/boot (normally by reading the con-
tents of a file which contains the host name, e.g. /etc/hostname)."
Although the files mentioned aren't there, I found in /etc/rc.sysinit
a section that seems to set the hostname by *calling* /bin/hostname.
>>
HOSTNAME=`/bin/hostname`
if [ -f /etc/sysconfig/network ]; then
. /etc/sysconfig/network
else
NETWORKING=no
fi
if [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" ]; then
HOSTNAME=localhost
fi
<<
[root localhost init.d]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain
[root localhost init.d]#
It would seem that the hostname is being set either by the
/etc/sysconfig/network file, or by the fallout case listed in
/etc/rc.sysinit (if -z $HOSTNAME ...).
I don't know why the hostname command would fail:
[root localhost init.d]# cat /etc/hostname
vectra
[root localhost init.d]#
Also, what does the line ". /etc/sysconfig/network" do?
Is "." (dot) a command?
--bk
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]