2005-10-15 09:53:21 +00:00
|
|
|
--- net-tools-1.60/man/en_US/hostname.1.gethostbyname 2005-10-14 11:33:41.000000000 +0200
|
|
|
|
+++ net-tools-1.60/man/en_US/hostname.1 2005-10-15 11:46:14.646697600 +0200
|
2009-10-29 11:26:54 +00:00
|
|
|
@@ -99,6 +99,33 @@
|
2005-10-15 09:53:21 +00:00
|
|
|
complete FQDN of the system is returned with
|
|
|
|
.BR "hostname \-\-fqdn" .
|
|
|
|
|
|
|
|
+.LP
|
|
|
|
+The function
|
|
|
|
+.BR gethostname(2)
|
2009-10-29 11:26:54 +00:00
|
|
|
+is used to get the hostname. When the
|
|
|
|
+.BR "hostname \-a, \-d, \-f or \-i"
|
2005-10-15 09:53:21 +00:00
|
|
|
+is called will
|
2006-01-02 10:00:42 +00:00
|
|
|
+.BR gethostbyname(3)
|
2005-10-15 09:53:21 +00:00
|
|
|
+be called. The difference in
|
|
|
|
+.BR gethostname(2)
|
|
|
|
+and
|
2006-01-02 10:00:42 +00:00
|
|
|
+.BR gethostbyname(3)
|
2005-10-15 09:53:21 +00:00
|
|
|
+is that
|
2006-01-02 10:00:42 +00:00
|
|
|
+.BR gethostbyname(3)
|
2005-10-15 09:53:21 +00:00
|
|
|
+is network aware, so it consults
|
|
|
|
+.IR /etc/nsswitch.conf
|
|
|
|
+and
|
|
|
|
+.IR /etc/host.conf
|
|
|
|
+to decide whether to read information in
|
|
|
|
+.IR /etc/sysconfig/network
|
|
|
|
+or
|
|
|
|
+.IR /etc/hosts
|
2009-10-29 11:26:54 +00:00
|
|
|
+
|
|
|
|
+To add another dimension to this,
|
2005-10-15 09:53:21 +00:00
|
|
|
+the
|
|
|
|
+.B hostname
|
|
|
|
+is also set when the network interface is brought up.
|
|
|
|
+
|
|
|
|
.SS "SET NAME"
|
|
|
|
When called with one argument or with the
|
|
|
|
.B \-\-file
|