Re: [PATCH] Add compile domain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux