From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 20844 invoked from network); 27 Dec 1998 23:36:36 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 27 Dec 1998 23:36:36 -0000 Received: from zippy.spods.dcs.kcl.ac.uk (colgate@zippy.spods.dcs.kcl.ac.uk [137.73.8.13]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id SAA15354 for ; Sun, 27 Dec 1998 18:21:57 -0500 Received: from localhost (colgate@localhost) by zippy.spods.dcs.kcl.ac.uk (8.8.3/8.6.12) with SMTP id XAA01553 for ; Sun, 27 Dec 1998 23:24:54 GMT Date: Sun, 27 Dec 1998 23:24:54 +0000 (GMT) From: Tristan Colgate To: axp-list@redhat.com Subject: Re: constantly changing /etc/HOSTNAME file In-Reply-To: <19981227224122.3399.qmail@hotmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I know the dhcp client does alter the network file, but if you are just using ppp to connect to an isp dhcpcd doesnt come into play. The IP is negotiaited by the pppd itself. I have to agree with you though, I cant see this being too hazardous. Tristan 'Minty' Colgate ================================ PGP 5.0 key available on request ================================ 'We are the music makers, the dreamers of the dream...' -Willy Wonka On Sun, 27 Dec 1998, Designer 7 wrote: > Hey, > > Uh... unless I'm totally brain dead right now (too early in the > morning)... I'm guessing you're using DHCP on ppp?(My assumption based > on the fact that certain fields in 'network' are left empty.) If so, > doesn't the DHCP protocol set all those values in 'network' for you? > Hence the HOSTNAME changes from DHCP information gotten during logon, > and hence, your network scripts find this and sets the HOSTNAME? > > Or how about this,... do a tail -f /etc/HOSTNAME or a watch -n 1 > /etc/HOSTNAME.... and watch exactly what happens as you logon to your > ISP... then you'll know exactly what step of the ISP logon process is > changing your HOSTNAME... > > By the way, what's the big deal? Is this changing HOSTNAME screwing up > some application that happens to use it? > > > > If the sequence of events is as you are describing them, it would > appear > >to be down to you ppp scripts. Are you using the default redhat setup > of > >have you installed anything else? > > > > You could, for instance, try Raines ppp scripts (check freshmeat.net > for > >the homepage). If the same thing still happens then something very odd > >must be happening. > > > >Tristan 'Minty' Colgate > > > >================================ > > > > > >PGP 5.0 key available on request > >================================ > >'We are the music makers, the dreamers of the dream...' > > -Willy Wonka > > > > > >On Sun, 27 Dec 1998, jmd wrote: > > > >> 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 > > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com > > -- > 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 >