Lennart Sorensen <[email protected]> wrote:
> I always thought that was how it worked. The first hostname in
> /etc/hosts on the line containing the short name was used as the FQDN.
> Maybe that is only a gnu hostname thing. I seem to recall solaris had a
> domainname file that was used to find the domain part of the FQDN
> instead.
yes this is how hostname works (see the man page)
# Technically: The FQDN is the name gethostbyname(2) returns for the host
# name returned by gethostname(2). The DNS domain name is the part after
# the first dot.
# Therefore it depends on the configuration (usually in /etc/host.conf)
# how you can change it. Usually (if the hosts file is parsed before DNS or
# NIS) you can change it in /etc/hosts.
And yes, this is broken, but who used hostname -f anyway?
BTW: the above works also (better?) if you set the utsname to the FQDN like
Linus does.
Gruss
Bernd
-
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]