updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / hostname / rh.patch
blob99699b8cbbc73f96e09f80f5585a00208468edff
1 diff -up hostname/hostname.1.rh hostname/hostname.1
2 --- hostname/hostname.1.rh 2011-12-28 15:13:29.000000000 +0100
3 +++ hostname/hostname.1 2011-12-29 12:17:57.000000000 +0100
4 @@ -98,6 +98,33 @@ complete FQDN of the system is returned
5 .B "THE FQDN"
6 below).
8 +.LP
9 +The function
10 +.BR gethostname(2)
11 +is used to get the hostname. When the
12 +.BR "hostname \-a, \-d, \-f or \-i"
13 +is called will
14 +.BR gethostbyname(3)
15 +be called. The difference in
16 +.BR gethostname(2)
17 +and
18 +.BR gethostbyname(3)
19 +is that
20 +.BR gethostbyname(3)
21 +is network aware, so it consults
22 +.IR /etc/nsswitch.conf
23 +and
24 +.IR /etc/host.conf
25 +to decide whether to read information in
26 +.IR /etc/sysconfig/network
27 +or
28 +.IR /etc/hosts
30 +To add another dimension to this,
31 +the
32 +.B hostname
33 +is also set when the network interface is brought up.
35 .SS "SET NAME"
36 When called with one argument or with the
37 .B \-\-file
38 @@ -113,7 +140,7 @@ and
39 use
40 .BR setdomainname (2).
41 Note, that this is effective only until the next reboot.
42 -Edit /etc/hostname for permanent change.
43 +After reboot original names from \fI/etc/hosts\fR are used again.
44 .LP
45 Note, that only the super-user can change the names.
46 .LP
47 @@ -124,10 +151,10 @@ command (see
48 below).
49 .LP
50 The host name is usually set once at system startup in
51 -.I /etc/init.d/hostname.sh
52 +.I /etc/rc.d/rc.sysinit
53 (normally by reading the contents of a file which contains
54 the host name, e.g.
55 -.IR /etc/hostname ).
56 +.IR /etc/sysconfig/network ).
58 .SS THE FQDN
59 You can't change the FQDN (as returned by
60 @@ -221,7 +248,7 @@ order of the output.
61 Display the short host name. This is the host name cut at the first dot.
62 .TP
63 .I "\-v, \-\-verbose"
64 -Be verbose and tell what's going on.
65 +Verbose output was removed.
66 .TP
67 .I "\-V, \-\-version"
68 Print version information on standard output and exit successfully.
69 @@ -246,9 +273,7 @@ option in
70 .SH FILES
71 .B /etc/hosts
73 -.B /etc/hostname
74 -Historically this file was supposed to only contain the hostname and not the
75 -full canonical FQDN. Nowadays most software is able to cope with a full FQDN here.
76 +.B /etc/sysconfig/network
77 .SH AUTHORS
78 Peter Tobias, <tobias@et-inf.fho-emden.de>
79 .br
80 diff -up hostname/Makefile.rh hostname/Makefile
81 --- hostname/Makefile.rh 2010-11-16 14:13:21.000000000 +0100
82 +++ hostname/Makefile 2011-12-29 12:16:31.000000000 +0100
83 @@ -7,26 +7,28 @@ OBJS=hostname.o
85 hostname: $(OBJS)
86 $(CC) $(CFLAGS) -o $@ $(OBJS) -lnsl
87 - ln -fs hostname dnsdomainname
88 - ln -fs hostname domainname
89 - ln -fs hostname ypdomainname
90 - ln -fs hostname nisdomainname
92 install: hostname
93 install -d ${BASEDIR}/usr/share/man/man1
94 - install -o root -g root -m 0644 hostname.1 ${BASEDIR}/usr/share/man/man1
95 + install -m 0644 hostname.1 ${BASEDIR}/usr/share/man/man1
96 ln -fs hostname.1 ${BASEDIR}/usr/share/man/man1/dnsdomainname.1
97 ln -fs hostname.1 ${BASEDIR}/usr/share/man/man1/domainname.1
98 ln -fs hostname.1 ${BASEDIR}/usr/share/man/man1/ypdomainname.1
99 ln -fs hostname.1 ${BASEDIR}/usr/share/man/man1/nisdomainname.1
100 - install -o root -g root -m 0644 hostname.1.fr ${BASEDIR}/usr/share/man/fr/man1/hostname.1
101 + install -d ${BASEDIR}/usr/share/man/fr/man1
102 + install -m 0644 hostname.1.fr ${BASEDIR}/usr/share/man/fr/man1/hostname.1
103 + ln -fs hostname.1 ${BASEDIR}/usr/share/man/fr/man1/dnsdomainname.1
104 + ln -fs hostname.1 ${BASEDIR}/usr/share/man/fr/man1/domainname.1
105 + ln -fs hostname.1 ${BASEDIR}/usr/share/man/fr/man1/ypdomainname.1
106 + ln -fs hostname.1 ${BASEDIR}/usr/share/man/fr/man1/nisdomainname.1
109 install -d ${BASEDIR}/bin
110 - install -o root -g root -m 0755 hostname ${BASEDIR}/bin
111 - ln -f hostname ${BASEDIR}/bin/dnsdomainname
112 - ln -f hostname ${BASEDIR}/bin/domainname
113 - ln -f hostname ${BASEDIR}/bin/nisdomainname
114 - ln -f hostname ${BASEDIR}/bin/ypdomainname
115 + install -m 0755 hostname ${BASEDIR}/bin
116 + ln -fs hostname ${BASEDIR}/bin/dnsdomainname
117 + ln -fs hostname ${BASEDIR}/bin/domainname
118 + ln -fs hostname ${BASEDIR}/bin/nisdomainname
119 + ln -fs hostname ${BASEDIR}/bin/ypdomainname
121 clean:
122 -rm -f $(OBJS) hostname dnsdomainname domainname nisdomainname ypdomainname