source: networking/connect/dhcpcd-systemd.xml@ 032be17

krejzi/svn
Last change on this file since 032be17 was 032be17, checked in by Krejzi <krejzi@…>, 10 years ago

Convert networking/connect, bridge-utils and qemu to systemd.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd-ng@14737 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 8.7 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY dhcpcd-download-http "http://roy.marples.name/downloads/dhcpcd/dhcpcd-&dhcpcd-version;.tar.bz2">
8 <!ENTITY dhcpcd-download-ftp " ">
9 <!--<!ENTITY dhcpcd-download-ftp "ftp://ftp.osuosl.org/pub/gentoo/distfiles/dhcpcd-&dhcpcd-version;.tar.bz2">-->
10 <!ENTITY dhcpcd-md5sum "6a421a8b0f19dbcbfca25e64a8ba76f3">
11 <!ENTITY dhcpcd-size "156 KB">
12 <!ENTITY dhcpcd-buildsize "2.3 MB">
13 <!ENTITY dhcpcd-time "less than 0.1 SBU">
14]>
15
16<sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
17 <?dbhtml filename="dhcpcd.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>dhcpcd-&dhcpcd-version;</title>
25
26 <indexterm zone="dhcpcd">
27 <primary sortas="a-dhcpcd">dhcpcd</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to dhcpcd</title>
32
33 <para><application>dhcpcd</application> is an implementation of the
34 DHCP client specified in RFC2131. A DHCP client is useful for connecting
35 your computer to a network which uses DHCP to assign network
36 addresses. dhcpcd strives to be a fully featured, yet very lightweight
37 DHCP client.</para>
38
39 &lfs76_checked;
40
41 <note>
42 <para>
43 Make sure that you disable the <command>systemd-networkd</command> service
44 or configure it not to manage the interfaces you want to manage with
45 <application>dhcpcd</application>.
46 </para>
47 </note>
48
49 <bridgehead renderas="sect3">Package Information</bridgehead>
50 <itemizedlist spacing="compact">
51 <listitem>
52 <para>Download (HTTP): <ulink url="&dhcpcd-download-http;"/></para>
53 </listitem>
54 <listitem>
55 <para>Download (FTP): <ulink url="&dhcpcd-download-ftp;"/></para>
56 </listitem>
57 <listitem>
58 <para>Download MD5 sum: &dhcpcd-md5sum;</para>
59 </listitem>
60 <listitem>
61 <para>Download size: &dhcpcd-size;</para>
62 </listitem>
63 <listitem>
64 <para>Estimated disk space required: &dhcpcd-buildsize;</para>
65 </listitem>
66 <listitem>
67 <para>Estimated build time: &dhcpcd-time;</para>
68 </listitem>
69 </itemizedlist>
70
71 <bridgehead renderas="sect3">dhcpcd Dependencies</bridgehead>
72
73 <bridgehead renderas="sect4">Optional</bridgehead>
74 <para role="optional">
75 <xref linkend="llvm"/> (with Clang)
76 </para>
77
78 <para condition="html" role="usernotes">User Notes:
79 <ulink url="&blfs-wiki;/dhcpcd"/></para>
80
81 </sect2>
82
83 <sect2 role="installation">
84 <title>Installation of dhcpcd</title>
85
86 <para>
87 First, silence a lot of warnings caused by using the latest toolchain
88 by running the following command:
89 </para>
90
91<screen><userinput>sed -i "s:BSD_SOURCE:DEFAULT_SOURCE:g" configure</userinput></screen>
92
93 <para>Install <application>dhcpcd</application> by running the following
94 commands:</para>
95
96<screen><userinput>./configure --libexecdir=/lib/dhcpcd \
97 --dbdir=/var/tmp &amp;&amp;
98make</userinput></screen>
99
100 <para>This package does not come with a test suite.</para>
101
102 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
103
104<screen role='root'><userinput>make install</userinput></screen>
105
106<!--
107 <para>By default, a plain text lease info file isn't created but the
108 <application>dhcpcd</application> provides a hook which can be used for creating
109 such a file. Install the hook by running the following
110 commands as the <systemitem class="username">root</systemitem> user:</para>
111
112<screen role='root'><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &amp;&amp;
113install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/</userinput></screen>
114-->
115
116 </sect2>
117
118 <sect2 role="commands">
119 <title>Command Explanations</title>
120
121 <para>
122 <parameter>--libexecdir=/lib/dhcpcd</parameter>: The default
123 <filename class="directory">/libexec</filename> is not FHS-compliant.
124 Since this directory may need to be available early in the boot,
125 <filename class="directory">/usr/libexec</filename> cannot be used either.
126 </para>
127
128 <para>
129 <parameter>--dbdir=/var/tmp</parameter>: The default
130 <filename class="directory">/var/lib</filename> is not FHS-compliant
131 </para>
132
133 <para>
134 <option>--with-hook=...</option>: You can optionally install more hooks,
135 for example to install some configuration files such as
136 <filename>ntp.conf</filename>. The set of hooks is in the
137 <filename class="directory">dhcpcd-hooks</filename> directory in the
138 build tree.
139 </para>
140 </sect2>
141
142 <sect2 role="configuration">
143 <title>Configuring dhcpcd</title>
144
145 <sect3 id="dhcpcd-config">
146 <title>Config Files</title>
147
148 <para><filename>/etc/dhcpcd.conf</filename></para>
149
150 <indexterm zone="dhcpcd dhcpcd-config">
151 <primary sortas="e-etc-dhcpcd-dhcpcd-conf">/etc/dhcpcd/dhcpcd.conf</primary>
152 </indexterm>
153
154 </sect3>
155
156 <sect3 id="dhcpcd-init">
157 <title>General Configuration Information</title>
158
159 <para>
160 If you want to configure network interfaces at boot using
161 <command>dhcpcd</command>, you need to install the
162 systemd unit included in <xref linkend="bootscripts"/>
163 package by running the following command as the
164 <systemitem class="username">root</systemitem> user:
165 </para>
166
167<screen role="root"><userinput>make install-dhcpcd</userinput></screen>
168
169 <indexterm zone="dhcpcd dhcpcd-init">
170 <primary sortas="f-dhcpcd">dhcpcd</primary>
171 </indexterm>
172
173 <para>
174 Whenever <command>dhcpcd</command> configures or shuts down
175 a network interface, it executes hook scripts. For more details
176 about those scripts, see the <command>dhcpcd-run-hooks</command> and
177 <command>dhcpcd</command> man pages.
178 </para>
179
180 <note>
181 <para id="dhcpcd-config3">
182 The default behavior of <command>dhcpcd</command> sets the
183 hostname and mtu settings. It also overwrites
184 <filename>/etc/resolv.conf</filename> and
185 <filename>/etc/ntp.conf</filename>.
186
187 These modifications to system files and settings on system
188 configuration files are done by hooks which are stored in
189 <filename class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
190
191 Setup <command>dhcpcd</command> by removing or adding hooks from/to
192 that directory. The execution of hooks can be disabled by using the
193 <option>--nohook</option> (<option>-C</option>) command line option or
194 by the <option>nohook</option> option in the
195 <filename>/etc/dhcpcd.conf</filename> file.
196 </para>
197 </note>
198
199 <indexterm zone="dhcpcd dhcpcd-config3">
200 <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
201 </indexterm>
202
203 <para>
204 At this point you can test if <command>dhcpcd</command> is
205 behaving as expected by running the following command as the
206 <systemitem class="username">root</systemitem> user:
207 </para>
208
209<screen role="root"><userinput>systemctl start dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
210
211 <para>
212 To start <command>dhcpcd</command> on a specific interface
213 at boot, enable the previously installed systemd unit by
214 running the following command as the
215 <systemitem class="username">root</systemitem> user:
216 </para>
217
218<screen role="root"><userinput>systemctl enable dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
219
220 <para>
221 Replace <replaceable>eth0</replaceable> with the actual interface name.
222 </para>
223
224 </sect3>
225
226 </sect2>
227
228 <sect2 role="content">
229 <title>Contents</title>
230
231 <segmentedlist>
232 <segtitle>Installed Programs</segtitle>
233 <segtitle>Installed Libraries</segtitle>
234 <segtitle>Installed Directories</segtitle>
235
236 <seglistitem>
237 <seg>dhcpcd</seg>
238 <seg>None</seg>
239 <seg>/lib/dhcpcd</seg>
240 </seglistitem>
241 </segmentedlist>
242
243 <variablelist>
244 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
245 <?dbfo list-presentation="list"?>
246 <?dbhtml list-presentation="table"?>
247
248 <varlistentry id="dhcpcd-prog">
249 <term><command>dhcpcd</command></term>
250 <listitem>
251 <para>is an implementation of the DHCP client specified
252 in RFC2131.</para>
253 <indexterm zone="dhcpcd dhcpcd-prog">
254 <primary sortas="b-dhcpcd">dhcpcd</primary>
255 </indexterm>
256 </listitem>
257 </varlistentry>
258
259 </variablelist>
260
261 </sect2>
262
263</sect1>
Note: See TracBrowser for help on using the repository browser.