]>
Commit | Line | Data |
---|---|---|
236898d6 MT |
1 | --- net-tools-1.60/man/en_US/hostname.1.gethostbyname 2005-10-14 11:33:41.000000000 +0200 |
2 | +++ net-tools-1.60/man/en_US/hostname.1 2005-10-15 11:46:14.646697600 +0200 | |
3 | @@ -99,6 +99,33 @@ | |
4 | complete FQDN of the system is returned with | |
5 | .BR "hostname \-\-fqdn" . | |
6 | ||
7 | +.LP | |
8 | +The function | |
9 | +.BR gethostname(2) | |
10 | +is used to get the hostname. When the | |
11 | +.BR "hostname \-a, \-d, \-f or \-i" | |
12 | +is called will | |
13 | +.BR gethostbyname(3) | |
14 | +be called. The difference in | |
15 | +.BR gethostname(2) | |
16 | +and | |
17 | +.BR gethostbyname(3) | |
18 | +is that | |
19 | +.BR gethostbyname(3) | |
20 | +is network aware, so it consults | |
21 | +.IR /etc/nsswitch.conf | |
22 | +and | |
23 | +.IR /etc/host.conf | |
24 | +to decide whether to read information in | |
25 | +.IR /etc/sysconfig/network | |
26 | +or | |
27 | +.IR /etc/hosts | |
28 | + | |
29 | +To add another dimension to this, | |
30 | +the | |
31 | +.B hostname | |
32 | +is also set when the network interface is brought up. | |
33 | + | |
34 | .SS "SET NAME" | |
35 | When called with one argument or with the | |
36 | .B \-\-file |