[Gllug] $HOSTNAME

Richard Jones rich at annexia.org
Tue Sep 8 20:04:52 UTC 2009


On Tue, Sep 08, 2009 at 06:47:40PM +0100, John G Walker wrote:
> 
> 
> On Tue, 08 Sep 2009 17:05:24 +0100 Peter Cannon
> <peter at cannon-linux.co.uk> wrote:
> 
> > John G Walker wrote:
> > > I think I'm going off my head.
> > > 
> > > Where is the $HOSTNAME variable set in OpenSUSE 10.1, using KDE3?
> > > Surely it's set from etc/HOSTNAME? Except they're suddenly
> > > different.
> > > 
> > > It's important because it's used in various scripts of mine
> > > (including the backup),
> > > 
> > 
> > /etc/HOSTNAME
> > 
> 
> That what I thought (see above) but it isn't. It's using a different
> value to the one on etc/HOSTNAME,

Older Debian systems had it in /etc/hostname (NB lowercase).

I've also seen systems where this comes from a "special" entry in
/etc/hosts.  It seems like the second line of /etc/hosts had the form:

<eth0-addr>  hostname.example.com hostname

and the hostname came from that.

Rich.

-- 
Richard Jones
Red Hat
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list