mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alistair John Strachan <s0348365@sms.ed.ac.uk>
To: "Martin J. Bligh" <mbligh@mbligh.org>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>,
	Linus Torvalds <torvalds@osdl.org>,
	Kyle McMartin <kyle@mcmartin.ca>,
	linux-kernel@vger.kernel.org,
	Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Subject: Re: [PATCH] Add compile domain
Date: Thu, 25 May 2006 22:38:37 +0100	[thread overview]
Message-ID: <200605252238.37352.s0348365@sms.ed.ac.uk> (raw)
In-Reply-To: <44761E38.7050702@mbligh.org>

On Thursday 25 May 2006 22:14, Martin J. Bligh wrote:
> > 20:35 mason:/etc # rpm -qf `which hostname`
> > net-tools-1.60-37
> > 21:00 mason:/etc # hostname -v
> > gethostname()=`mason'
> > mason
> > 21:00 mason:/etc # hostname --fqdn
> > mason
> > 21:00 mason:/etc # domainname
> > (none)
> > 21:00 mason:/etc # dnsdomainname
> >
> >
> > Runs Aurora Linux 2.0.
>
> Ubuntu does this too:
>
> mbligh@flay:~$ hostname
> flay
> mbligh@flay:~$ hostname --fqdn
> localhost.localdomain

I think it's as Lennart suggested. From the man page for /etc/hosts ("man 
hosts"), it seems to suggest that the format should be:

IP_address canonical_hostname aliases

On Ubuntu and approximately on my system, it's doing:

127.0.0.1 localhost.localdomain <alias>

But the manpage suggests that "alias" might contain "localhost". On our 
machines it contains the "name" we assigned the machine.

So, I think my hosts is screwed (because I don't have the .localdomain bit), 
but I think Ubuntu is correct, and using the FQDN is not actually as 
intuitive as you might think.

For identification purposes, an "alias" is probably more useful (in general) 
than the FQDN, because the FQDN may well be something meaningless like 
localhost.localdomain, which is "fully qualified" but isn't a _unique_ 
machine name, and thus not really a valid domain in a network context.

(The 'hostname' utility from net-tools is using the "canonical hostname" 
from /etc/hosts as the value for the FQDN, but gethostname() for the regular 
hostname.)

-- 
Cheers,
Alistair.

Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.

  reply	other threads:[~2006-05-25 21:38 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-25 14:17 [PATCH] Well, Linus seems to like Lordi Kyle McMartin
2006-05-25 15:46 ` Linus Torvalds
2006-05-25 16:02   ` Steven Rostedt
2006-05-25 16:15   ` alan
2006-05-25 16:26     ` Linus Torvalds
2006-05-25 16:43       ` Jan Engelhardt
2006-05-26 23:47         ` Folkert van Heusden
2006-05-27  7:05           ` Oliver Neukum
2006-05-25 16:37 ` [PATCH] Add compile domain (was: Re: [PATCH] Well, Linus seems to like Lordi...) Jan Engelhardt
2006-05-25 16:48   ` Linus Torvalds
2006-05-25 18:40     ` Jan Engelhardt
2006-05-25 18:47       ` Linus Torvalds
2006-05-25 18:53         ` [PATCH] Add compile domain İsmail Dönmez
2006-05-25 18:59           ` Jan Engelhardt
2006-05-25 19:00             ` İsmail Dönmez
2006-05-25 18:54         ` [PATCH] Add compile domain (was: Re: [PATCH] Well, Linus seems to like Lordi...) Alistair John Strachan
2006-05-25 19:02           ` Jan Engelhardt
2006-05-25 21:14             ` [PATCH] Add compile domain Martin J. Bligh
2006-05-25 21:38               ` Alistair John Strachan [this message]
2006-05-25 22:12                 ` Måns Rullgård
2006-05-25 21:43               ` Måns Rullgård
2006-05-25 19:06           ` [PATCH] Add compile domain (was: Re: [PATCH] Well, Linus seems to like Lordi...) Linus Torvalds
2006-05-25 20:29           ` Lennart Sorensen
2006-05-26 11:56             ` Jan Engelhardt
2006-05-26 21:11               ` Christian Trefzer
2006-05-27  2:14                 ` [PATCH] Add compile domain Bernd Eckenfels
2006-05-29 12:25                 ` [PATCH] Add compile domain (was: Re: [PATCH] Well, Linus seems to like Lordi...) Gabor Gombas
2006-05-29 23:13                   ` [PATCH] Add compile domain Bernd Eckenfels
2006-05-30 13:54                     ` Gabor Gombas
2006-05-27  2:13             ` Bernd Eckenfels
2006-05-25 19:43         ` [PATCH] Add compile domain (was: Re: [PATCH] Well, Linus seems to like Lordi...) bjdouma
2006-05-25 20:13       ` Lennart Sorensen
2006-05-25 20:34         ` H. Peter Anvin
2006-05-27  2:19         ` [PATCH] Add compile domain Bernd Eckenfels
2006-05-29 12:08     ` [PATCH] Add compile domain (was: Re: [PATCH] Well, Linus seems to like Lordi...) Gabor Gombas
2006-05-29 20:20       ` Linus Torvalds
2006-05-29 20:47         ` Joshua Hudson
2006-05-29 23:17           ` [PATCH] Add compile domain Bernd Eckenfels

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200605252238.37352.s0348365@sms.ed.ac.uk \
    --to=s0348365@sms.ed.ac.uk \
    --cc=jengelh@linux01.gwdg.de \
    --cc=kyle@mcmartin.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsorense@csclub.uwaterloo.ca \
    --cc=mbligh@mbligh.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®