[Hostname-devel] [SCM] Git repository for hostname branch, master, updated. debian/3.11-3-g06dcd24
Michael Meskes
meskes at debian.org
Thu Dec 6 15:25:00 UTC 2012
The following commit has been merged in the master branch:
commit c4a373e92cf34b9717fbcd6e1905f7d3a533105a
Author: Michael Meskes <meskes at debian.org>
Date: Thu Dec 6 16:18:11 2012 +0100
Rewrote parts of the manpage.
Thanks: Ben Wong <bugs.debian.org at wongs.net>
Closes: #568889
diff --git a/debian/changelog b/debian/changelog
index 1a6e092..8ec5252 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+hostname (3.12) unstable; urgency=low
+
+ * Rewrote parts of the manpage.
+ Thanks to Ben Wong <bugs.debian.org at wongs.net> (Closes: #568889)
+
+ -- Michael Meskes <meskes at debian.org> Thu, 06 Dec 2012 16:15:53 +0100
+
hostname (3.11) unstable; urgency=low
* Fixed typo in manpage.
diff --git a/hostname.1 b/hostname.1
index e290668..48aed71 100644
--- a/hostname.1
+++ b/hostname.1
@@ -116,13 +116,31 @@ the host name, e.g.
.IR /etc/hostname ).
.SS THE FQDN
-You can't change the FQDN (as returned by
-.BR "hostname \-\-fqdn" )
-or the DNS domain name (as returned by
-.BR "dnsdomainname" )
-with this command. The FQDN of the system is the name that the
+The FQDN (Fully Qualified Domain Name) of the system is the name that the
.BR resolver (3)
-returns for the host name.
+returns for the host name, such as,
+.IR ursula.example.com .
+It is usually the hostname followed by the DNS domain name (the part
+after the first dot). You can check the FQDN using
+.B "hostname \-\-fqdn"
+or the domain name using
+.BR "dnsdomainname" .
+.LP
+You cannot change the FQDN with
+.B hostname
+or
+.BR dnsdomainname .
+.LP
+The recommended method of setting the FQDN is to make the hostname be
+an alias for the fully qualified name using
+.IR /etc/hosts ,
+DNS, or NIS. For example, if the hostname was "ursula", one might have a line in
+.I /etc/hosts
+which reads
+.LP
+.RS
+127.0.1.1 ursula.example.com ursula
+.RE
.LP
Technically: The FQDN is the name
.BR getaddrinfo (3)
@@ -130,10 +148,10 @@ returns for the host name returned by
.BR gethostname (2).
The DNS domain name is the part after the first dot.
.LP
-Therefore it depends on the configuration (usually in
+Therefore it depends on the configuration of the resolver (usually in
.IR /etc/host.conf )
-how you can change it. Usually (if the hosts file is parsed before DNS or
-NIS) you can change it in
+how you can change it. Usually the hosts file is parsed before DNS or
+NIS, so it is most common to change the FQDN in
.IR /etc/hosts .
.LP
If a machine has multiple network interfaces/addresses or is used in a
@@ -230,11 +248,15 @@ try IPv6 lookups first by using the
option in
.BR /etc/resolv.conf .
.SH FILES
-.B /etc/hosts
-
.B /etc/hostname
Historically this file was supposed to only contain the hostname and not the
-full canonical FQDN. Nowadays most software is able to cope with a full FQDN here.
+full canonical FQDN. Nowadays most software is able to cope with a full FQDN
+here. This file is read at boot time by the system initialization scripts to
+set the hostname.
+.LP
+.B /etc/hosts
+Usually, this is where one sets the domain name by aliasing the host name to
+the FQDN.
.SH AUTHORS
Peter Tobias, <tobias at et-inf.fho-emden.de>
.br
diff --git a/hostname.c b/hostname.c
index fd84a3e..5373bc8 100644
--- a/hostname.c
+++ b/hostname.c
@@ -45,7 +45,7 @@
#include <err.h>
#include <rpcsvc/ypclnt.h>
-#define VERSION "3.11"
+#define VERSION "3.12"
enum type_t { DEFAULT, DNS, FQDN, SHORT, ALIAS, IP, NIS, NIS_DEF, ALL_FQDNS, ALL_IPS };
--
Git repository for hostname
More information about the Hostname-devel
mailing list