]> git.pld-linux.org Git - packages/hostname.git/blob - hostname-rh.patch
10424ba2d42556a864e2ae4c8bb6001470d49918
[packages/hostname.git] / hostname-rh.patch
1 --- hostname/hostname.1.orig    2011-12-23 11:06:18.000000000 +0100
2 +++ hostname/hostname.1 2011-12-26 13:51:57.685537617 +0100
3 @@ -98,6 +98,33 @@
4  .B "THE FQDN"
5  below).
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
37 @@ -113,7 +140,7 @@
38  use
39  .BR setdomainname (2).
40  Note, that this is effective only until the next reboot.
41 -Edit /etc/hostname for permanent change.
42 +After reboot original names from \fI/etc/hosts\fR are used again. 
43  .LP
44  Note, that only the super-user can change the names.
45  .LP
46 @@ -124,10 +151,10 @@
47  below).
48  .LP
49  The host name is usually set once at system startup in
50 -.I /etc/init.d/hostname.sh
51 +.I /etc/rc.d/rc.sysinit
52  (normally by reading the contents of a file which contains
53  the host name, e.g.
54 -.IR /etc/hostname ).
55 +.IR /etc/sysconfig/network ).
56  
57  .SS THE FQDN
58  You can't change the FQDN (as returned by
59 @@ -227,7 +254,7 @@
60  Print version information on standard output and exit successfully.
61  .TP
62  .I "\-v, \-\-verbose"
63 -Be verbose and tell what's going on.
64 +Verbose output was removed.
65  .TP
66  .I "\-y, \-\-yp, \-\-nis"
67  Display the NIS domain name. If a parameter is given (or
68 @@ -246,9 +273,7 @@
69  .SH FILES
70  .B /etc/hosts
71  
72 -.B /etc/hostname
73 -Historically this file was supposed to only contain the hostname and not the
74 -full canonical FQDN. Nowadays most software is able to cope with a full FQDN here.
75 +.B /etc/sysconfig/network
76  .SH AUTHORS
77  Peter Tobias, <tobias@et-inf.fho-emden.de>
78  .br
79 --- hostname/Makefile.orig      2012-02-16 16:00:52.000000000 +0100
80 +++ hostname/Makefile   2012-02-27 19:50:50.216326829 +0100
81 @@ -7,22 +7,23 @@
82  
83  hostname: $(OBJS)
84         $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) -lnsl
85 -       ln -fs hostname dnsdomainname
86 -       ln -fs hostname domainname
87 -       ln -fs hostname ypdomainname
88 -       ln -fs hostname nisdomainname
89  
90  install: hostname
91         install -d ${BASEDIR}/usr/share/man/man1
92 -       install -o root -g root -m 0644 hostname.1 ${BASEDIR}/usr/share/man/man1
93 +       install -m 0644 hostname.1 ${BASEDIR}/usr/share/man/man1
94         ln -fs hostname.1 ${BASEDIR}/usr/share/man/man1/dnsdomainname.1
95         ln -fs hostname.1 ${BASEDIR}/usr/share/man/man1/domainname.1
96         ln -fs hostname.1 ${BASEDIR}/usr/share/man/man1/ypdomainname.1
97         ln -fs hostname.1 ${BASEDIR}/usr/share/man/man1/nisdomainname.1
98 -       #install -o root -g root -m 0644 hostname.1.fr ${BASEDIR}/usr/share/man/fr/man1/hostname.1
99 +       install -d ${BASEDIR}/usr/share/man/fr/man1
100 +       install -m 0644 hostname.1.fr ${BASEDIR}/usr/share/man/fr/man1/hostname.1
101 +       ln -fs hostname.1 ${BASEDIR}/usr/share/man/fr/man1/dnsdomainname.1
102 +       ln -fs hostname.1 ${BASEDIR}/usr/share/man/fr/man1/domainname.1
103 +       ln -fs hostname.1 ${BASEDIR}/usr/share/man/fr/man1/ypdomainname.1
104 +       ln -fs hostname.1 ${BASEDIR}/usr/share/man/fr/man1/nisdomainname.1
105  
106         install -d ${BASEDIR}/bin
107 -       install -o root -g root -m 0755 hostname ${BASEDIR}/bin
108 +       install -m 0755 hostname ${BASEDIR}/bin
109         ln -f hostname ${BASEDIR}/bin/dnsdomainname
110         ln -f hostname ${BASEDIR}/bin/domainname
111         ln -f hostname ${BASEDIR}/bin/nisdomainname
This page took 0.071939 seconds and 2 git commands to generate.