Messages in this thread | | | From | (Bernd Eckenfels) | Subject | Re: [PATCH] Add compile domain | Date | Sat, 27 May 2006 04:13:19 +0200 |
| |
Lennart Sorensen <lsorense@csclub.uwaterloo.ca> 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |