From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 17131 invoked from network); 27 Dec 1998 22:07:18 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 27 Dec 1998 22:07:18 -0000 Received: from mail1.infinet.com (mail1.infinet.com [206.103.240.3]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id QAA13291 for ; Sun, 27 Dec 1998 16:52:41 -0500 Received: from infinet.com (dca2@a043.pm3-1.nwk.infinet.com [216.28.52.43]) by mail1.infinet.com (8.8.8/8.8.5) with ESMTP id QAA07393 for ; Sun, 27 Dec 1998 16:52:40 -0500 (EST) Sender: dca2@infinet.com Message-ID: <3686AB0E.B110A418@infinet.com> Date: Sun, 27 Dec 1998 21:47:58 +0000 From: jmd X-Mailer: Mozilla 4.04 [en] (X11; I; Linux 2.0.32 i586) MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: constantly changing /etc/HOSTNAME file References: <199812262032.NAA11179@ellpspace.math.ualberta.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Michal Jaegermann wrote: > > jmd wrote: > > > > Everytime I connect to my ISP something overwrites the /etc/HOSTNAME > > file so that it reads a given address. (ie "a021.pm3-1.nwk.infinet.com") > > This change occurs with every login session as far as I can see, so a > > revoot will reflect the last dynamic IP assigned. > > Normally (i.e. in a standard startup used by Red Hat) /etc/rc.d/rc.sysinit > startup script sets hostname, and records the change in /etc/HOSTNAME, > using values specified in /etc/sysconfig/network file (unless NETWORKING > is set to "no"). What actually is in /etc/HOSTNAME is not that important. > Even if you are using DHCP it is hard to imagine that your ISP is that > "smart" that it rewrites your sysconfig files. I don't think the ISP is writing to this file. I think there is something internally wrong with my set up. I checked both files you referred to: /etc/sysconfig/network is: NETWORKING=YES FORWARD_IPV4=NO HOSTNAME=localhost.localdomain GATEWAYDEV= GATEWAY= /etc/rc.d/rc.sysinit includes the lines: if [ -f /etc/sysconfig/network ]; then . /etc/sysconfig/network else NETWORKING=no HOSTNAME=localhost This is what happens: I boot clean with "localhost.localdomain" in my /etc/HOSTNAME file. If I dial in to my ISP this file (etc/HOSTNAME) is changed as soon as I am logged in the ISP and have been assigned an IP address. (example a021.pm3-1.nwk.infinet.com) Taking that example if I open /etc/HOSTNAME after I log in to the ISP the file will read "a021.pm3-1.nwk.infinet.com" localhost.localdomain will not be in this file. If I open another terminal with ctl-alt-F2 then the login prompt will be: [jmd@a021 jmd]$ I changed the permissions for /etc/HOSTNAME to 444 and it still wrote to the file. >I think that something is missing here from your story. > > BTW - your machine may have different names "internally" and "outside". > This is normal. > > Michal > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com