[lkml]   [2006]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Add compile domain
Lennart Sorensen <> 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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-05-27 04:15    [W:0.073 / U:1.888 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site