1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY dhcpcd-download-http "http://www.phystech.com/ftp/dhcpcd-&dhcpcd-version;.tar.gz">
|
---|
8 | <!ENTITY dhcpcd-download-ftp "ftp://ftp.phystech.com/pub/dhcpcd-&dhcpcd-version;.tar.gz">
|
---|
9 | <!ENTITY dhcpcd-md5sum "dd627a121e43835bead3ffef5b1a72fd">
|
---|
10 | <!ENTITY dhcpcd-size "145 KB">
|
---|
11 | <!ENTITY dhcpcd-buildsize "944 KB">
|
---|
12 | <!ENTITY dhcpcd-time "0.04 SBU">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
|
---|
16 | <?dbhtml filename="dhcpcd.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>Dhcpcd-&dhcpcd-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="dhcpcd">
|
---|
26 | <primary sortas="a-Dhcpcd">Dhcpcd</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to Dhcpcd</title>
|
---|
31 |
|
---|
32 | <para>The <application>dhcpcd</application> package contains the
|
---|
33 | <command>dhcpcd</command> client. This is useful for connecting your computer
|
---|
34 | to a network which uses DHCP to assign network addresses.</para>
|
---|
35 |
|
---|
36 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
37 | <itemizedlist spacing="compact">
|
---|
38 | <listitem>
|
---|
39 | <para>Download (HTTP): <ulink url="&dhcpcd-download-http;"/></para>
|
---|
40 | </listitem>
|
---|
41 | <listitem>
|
---|
42 | <para>Download (FTP): <ulink url="&dhcpcd-download-ftp;"/></para>
|
---|
43 | </listitem>
|
---|
44 | <listitem>
|
---|
45 | <para>Download MD5 sum: &dhcpcd-md5sum;</para>
|
---|
46 | </listitem>
|
---|
47 | <listitem>
|
---|
48 | <para>Download size: &dhcpcd-size;</para>
|
---|
49 | </listitem>
|
---|
50 | <listitem>
|
---|
51 | <para>Estimated disk space required: &dhcpcd-buildsize;</para>
|
---|
52 | </listitem>
|
---|
53 | <listitem>
|
---|
54 | <para>Estimated build time: &dhcpcd-time;</para>
|
---|
55 | </listitem>
|
---|
56 | </itemizedlist>
|
---|
57 |
|
---|
58 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
59 | <itemizedlist spacing='compact'>
|
---|
60 | <listitem>
|
---|
61 | <para>Required Patch:
|
---|
62 | <ulink url="&patch-root;/dhcpcd-&dhcpcd-version;-fhs-1.patch"/></para>
|
---|
63 | </listitem>
|
---|
64 | </itemizedlist>
|
---|
65 |
|
---|
66 | </sect2>
|
---|
67 |
|
---|
68 | <sect2 role="installation">
|
---|
69 | <title>Installation of Dhcpcd</title>
|
---|
70 |
|
---|
71 | <para>Install <application>dhcpcd</application> by running the following
|
---|
72 | commands:</para>
|
---|
73 |
|
---|
74 | <screen><userinput>patch -Np1 -i ../dhcpcd-&dhcpcd-version;-fhs-1.patch &&
|
---|
75 | ./configure --prefix="" --sysconfdir=/var/lib \
|
---|
76 | --mandir=/usr/share/man &&
|
---|
77 | make</userinput></screen>
|
---|
78 |
|
---|
79 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
80 |
|
---|
81 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
82 |
|
---|
83 | </sect2>
|
---|
84 |
|
---|
85 | <sect2 role="commands">
|
---|
86 | <title>Command Explanations</title>
|
---|
87 |
|
---|
88 | <para><command>patch -Np1 -i ../dhcpcd-&dhcpcd-version;-fhs-1.patch</command>:
|
---|
89 | <application>dhcpcd</application> unpatched puts all configuration
|
---|
90 | and temporary files in <filename class='directory'>/etc/dhcpc</filename>. This
|
---|
91 | becomes very annoying when <application>dhcpcd</application> tells you it's
|
---|
92 | running and it's not. You look in
|
---|
93 | <filename class="directory">/var/run</filename> for the
|
---|
94 | <filename>PID</filename> file, but it's not there, the
|
---|
95 | <filename>PID</filename> file that needs deleting is in
|
---|
96 | <filename class="directory">/etc/dhcpc</filename>. This patch brings this
|
---|
97 | program into FHS compliance, but more importantly, puts
|
---|
98 | files where you expect them to be.</para>
|
---|
99 |
|
---|
100 | <para><parameter>--prefix=""</parameter>: There may be a good reason for
|
---|
101 | abandoning the normal BLFS convention of using
|
---|
102 | <parameter>--prefix=/usr</parameter> here. If you are installing
|
---|
103 | DHCP, it is likely that it is
|
---|
104 | required during the boot process and
|
---|
105 | <filename class="directory">/usr</filename> may be network mounted, in which
|
---|
106 | case <command>dhcpcd</command> wouldn't be available due to being on the
|
---|
107 | network! Therefore, depending on your situation, you may want it to be
|
---|
108 | installed in <filename class="directory">/sbin</filename> or
|
---|
109 | <filename class="directory">/usr/sbin</filename>. This command installs to
|
---|
110 | <filename class="directory">/sbin</filename>.</para>
|
---|
111 |
|
---|
112 | <para><parameter>--sysconfdir=/var/lib</parameter>: This command installs
|
---|
113 | configuration files in the <filename class="directory">/var/lib</filename>
|
---|
114 | directory.</para>
|
---|
115 |
|
---|
116 | <para><parameter>--mandir=/usr/share/man</parameter>: This command installs
|
---|
117 | the man pages to the <filename class="directory">/usr/share/man</filename>
|
---|
118 | directory.</para>
|
---|
119 |
|
---|
120 | </sect2>
|
---|
121 |
|
---|
122 | <sect2 role="configuration">
|
---|
123 | <title>Configuring Dhcpcd</title>
|
---|
124 |
|
---|
125 | <sect3 id="dhcpcd-config">
|
---|
126 | <title>Config Files</title>
|
---|
127 |
|
---|
128 | <para><filename>/var/lib/dhcpc/*</filename></para>
|
---|
129 |
|
---|
130 | <indexterm zone="dhcpcd dhcpcd-config">
|
---|
131 | <primary sortas="e-var-lib-dhcpc">/var/lib/dhcpc/*</primary>
|
---|
132 | </indexterm>
|
---|
133 |
|
---|
134 | </sect3>
|
---|
135 |
|
---|
136 | <sect3 id="dhcpcd-init">
|
---|
137 | <title>Configuration Information</title>
|
---|
138 |
|
---|
139 | <para>To configure <command>dhcpcd</command>, you need to first install
|
---|
140 | the network service script,
|
---|
141 | <filename>/etc/sysconfig/network-devices/services/dhcpcd</filename>
|
---|
142 | included in the <xref linkend="intro-important-bootscripts"/> package
|
---|
143 | (as user <systemitem class="username">root</systemitem>):</para>
|
---|
144 |
|
---|
145 | <indexterm zone="dhcpcd dhcpcd-init">
|
---|
146 | <primary sortas="f-dhcpcd">dhcpcd (service script)</primary>
|
---|
147 | </indexterm>
|
---|
148 |
|
---|
149 | <screen role='root'><userinput>make install-service-dhcpcd</userinput></screen>
|
---|
150 |
|
---|
151 | <para id="dhcpcd-config2">Finally, as the <systemitem
|
---|
152 | class="username">root</systemitem> user create the
|
---|
153 | <filename>/etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd</filename>
|
---|
154 | configuration file using the following commands. Adjust appropriately
|
---|
155 | for additional interfaces:</para>
|
---|
156 |
|
---|
157 | <indexterm zone="dhcpcd dhcpcd-config2">
|
---|
158 | <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/.../dhcpcd</primary>
|
---|
159 | </indexterm>
|
---|
160 |
|
---|
161 | <screen role='root'><userinput>install -v -d /etc/sysconfig/network-devices/ifconfig.eth0 &&
|
---|
162 | cat > /etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd << "EOF"
|
---|
163 | <literal>ONBOOT="yes"
|
---|
164 | SERVICE="dhcpcd"
|
---|
165 | DHCP_START="<replaceable>[insert appropriate start options here]</replaceable>"
|
---|
166 | DHCP_STOP="-k <replaceable>[insert additional stop options here]</replaceable>"
|
---|
167 |
|
---|
168 | # Set PRINTIP="yes" to have the script print
|
---|
169 | # the DHCP assigned IP address
|
---|
170 | PRINTIP="no"
|
---|
171 |
|
---|
172 | # Set PRINTALL="yes" to print the DHCP assigned values for
|
---|
173 | # IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
|
---|
174 | PRINTALL="no"</literal>
|
---|
175 | EOF</userinput></screen>
|
---|
176 |
|
---|
177 | <para>For more information on the appropriate <envar>DHCP_START</envar> and
|
---|
178 | <envar>DHCP_STOP</envar> values, examine the man page for
|
---|
179 | <command>dhcpcd</command>.</para>
|
---|
180 |
|
---|
181 | <note>
|
---|
182 | <para id="dhcpcd-config3">The default behavior of
|
---|
183 | <command>dhcpcd</command> is to overwrite (after making backup copies)
|
---|
184 | <filename>/etc/resolv.conf</filename>, <filename>/etc/yp.conf</filename> and
|
---|
185 | <filename>/etc/ntp.conf</filename> with new files containing information from
|
---|
186 | the DHCP server. If this is undesirable, review the
|
---|
187 | <command>dhcpcd</command> man page for switches to add to the
|
---|
188 | <envar>DHCP_START</envar> value.</para>
|
---|
189 | </note>
|
---|
190 |
|
---|
191 | <indexterm zone="dhcpcd dhcpcd-config3">
|
---|
192 | <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
|
---|
193 | </indexterm>
|
---|
194 |
|
---|
195 | <indexterm zone="dhcpcd dhcpcd-config3">
|
---|
196 | <primary sortas="e-etc-yp.conf">/etc/yp.conf</primary>
|
---|
197 | </indexterm>
|
---|
198 |
|
---|
199 | <indexterm zone="dhcpcd dhcpcd-config3">
|
---|
200 | <primary sortas="e-etc-ntp.conf">/etc/ntp.conf</primary>
|
---|
201 | </indexterm>
|
---|
202 |
|
---|
203 | </sect3>
|
---|
204 |
|
---|
205 | </sect2>
|
---|
206 |
|
---|
207 | <sect2 role="content">
|
---|
208 | <title>Contents</title>
|
---|
209 |
|
---|
210 | <segmentedlist>
|
---|
211 | <segtitle>Installed Program</segtitle>
|
---|
212 | <segtitle>Installed Libraries</segtitle>
|
---|
213 | <segtitle>Installed Directories</segtitle>
|
---|
214 |
|
---|
215 | <seglistitem>
|
---|
216 | <seg>dhcpcd</seg>
|
---|
217 | <seg>None</seg>
|
---|
218 | <seg>/var/lib/dhcpc</seg>
|
---|
219 | </seglistitem>
|
---|
220 | </segmentedlist>
|
---|
221 |
|
---|
222 | <variablelist>
|
---|
223 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
224 | <?dbfo list-presentation="list"?>
|
---|
225 | <?dbhtml list-presentation="table"?>
|
---|
226 |
|
---|
227 | <varlistentry id="dhcpcd-prog">
|
---|
228 | <term><command>dhcpcd</command></term>
|
---|
229 | <listitem>
|
---|
230 | <para>is an implementation of the DHCP client
|
---|
231 | specified in RFC2131 and RFC1541
|
---|
232 | (depending on which options are specified).</para>
|
---|
233 | <indexterm zone="dhcpcd dhcpcd-prog">
|
---|
234 | <primary sortas="b-dhcpcd">dhcpcd</primary>
|
---|
235 | </indexterm>
|
---|
236 | </listitem>
|
---|
237 | </varlistentry>
|
---|
238 |
|
---|
239 | </variablelist>
|
---|
240 |
|
---|
241 | </sect2>
|
---|
242 |
|
---|
243 | </sect1>
|
---|
244 |
|
---|