15265f
diff -up hostname/Makefile.rh hostname/Makefile
15265f
--- hostname/Makefile.rh	2013-11-04 10:12:59.670379153 +0100
15265f
+++ hostname/Makefile	2013-11-04 10:15:04.957314495 +0100
15265f
@@ -17,14 +17,14 @@ OBJS=hostname.o
15265f
 
15265f
 install: hostname
15265f
 	install -d ${BASEDIR}$(MANDIR)/man1
15265f
-	install -o root -g root -m 0644 hostname.1 ${BASEDIR}$(MANDIR)/man1
15265f
+	install -m 0644 hostname.1 ${BASEDIR}$(MANDIR)/man1
15265f
 	ln -fs hostname.1 ${BASEDIR}$(MANDIR)/man1/dnsdomainname.1
15265f
 	ln -fs hostname.1 ${BASEDIR}$(MANDIR)/man1/domainname.1
15265f
 	ln -fs hostname.1 ${BASEDIR}$(MANDIR)/man1/ypdomainname.1
15265f
 	ln -fs hostname.1 ${BASEDIR}$(MANDIR)/man1/nisdomainname.1
15265f
 
15265f
 	install -d ${BASEDIR}$(BINDIR)
15265f
-	install -o root -g root -m 0755 hostname ${BASEDIR}$(BINDIR)
15265f
+	install -m 0755 hostname ${BASEDIR}$(BINDIR)
15265f
 	ln -fs hostname ${BASEDIR}$(BINDIR)/dnsdomainname
15265f
 	ln -fs hostname ${BASEDIR}$(BINDIR)/domainname
15265f
 	ln -fs hostname ${BASEDIR}$(BINDIR)/nisdomainname
15265f
diff -up hostname/hostname.1.rh hostname/hostname.1
15265f
--- hostname/hostname.1.rh	2013-11-03 15:24:23.000000000 +0100
15265f
+++ hostname/hostname.1	2013-11-04 10:12:59.670379153 +0100
15265f
@@ -80,6 +80,28 @@ complete FQDN of the system is returned
15265f
 .B "THE FQDN"
15265f
 below).
15265f
 
15265f
+.LP
15265f
+The function 
15265f
+.BR gethostname(2)
15265f
+is used to get the hostname.  When the 
15265f
+.BR "hostname \-a, \-d, \-f or \-i" 
15265f
+is called will 
15265f
+.BR gethostbyname(3)
15265f
+be called.  The difference in 
15265f
+.BR gethostname(2)
15265f
+and
15265f
+.BR gethostbyname(3)
15265f
+is that
15265f
+.BR gethostbyname(3)
15265f
+is network aware, so it consults 
15265f
+.IR /etc/nsswitch.conf
15265f
+and
15265f
+.IR /etc/host.conf
15265f
+to decide whether to read information in
15265f
+.IR /etc/hostname
15265f
+or
15265f
+.IR /etc/hosts
15265f
+
15265f
 .SS "SET NAME"
15265f
 When called with one argument or with the
15265f
 .B \-\-file
15265f
@@ -105,8 +127,7 @@ command (see
15265f
 .B "THE FQDN"
15265f
 below).
15265f
 .LP
15265f
-The host name is usually set once at system startup in
15265f
-.I /etc/init.d/hostname.sh
15265f
+The host name is usually set once at system startup
15265f
 (normally by reading the contents of a file which contains
15265f
 the host name, e.g.
15265f
 .IR /etc/hostname ).