source: networking/connect/dhcpcd-systemd.xml@ 414d109

7.6-blfs 7.6-systemd kde5-14269 kde5-14686 systemd-13485
Last change on this file since 414d109 was 414d109, checked in by Krejzi <krejzi@…>, 10 years ago

Added systemd configuration to dhcpcd.

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

  • Property mode set to 100644
File size: 8.0 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 "b22005c131e7108ecf598b6a4ac091eb">
11 <!ENTITY dhcpcd-size "148 KB">
12 <!ENTITY dhcpcd-buildsize "2.2 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 &lfs75_checked;
40
41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
44 <para>Download (HTTP): <ulink url="&dhcpcd-download-http;"/></para>
45 </listitem>
46 <listitem>
47 <para>Download (FTP): <ulink url="&dhcpcd-download-ftp;"/></para>
48 </listitem>
49 <listitem>
50 <para>Download MD5 sum: &dhcpcd-md5sum;</para>
51 </listitem>
52 <listitem>
53 <para>Download size: &dhcpcd-size;</para>
54 </listitem>
55 <listitem>
56 <para>Estimated disk space required: &dhcpcd-buildsize;</para>
57 </listitem>
58 <listitem>
59 <para>Estimated build time: &dhcpcd-time;</para>
60 </listitem>
61 </itemizedlist>
62
63 <para condition="html" role="usernotes">User Notes:
64 <ulink url="&blfs-wiki;/dhcpcd"/></para>
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>./configure --libexecdir=/lib/dhcpcd \
75 --dbdir=/var/tmp &amp;&amp;
76make</userinput></screen>
77
78 <para>This package does not come with a test suite.</para>
79
80 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
81
82<screen role='root'><userinput>make install</userinput></screen>
83
84<!--
85 <para>By default, a plain text lease info file isn't created but the
86 <application>dhcpcd</application> provides a hook which can be used for creating
87 such a file. Install the hook by running the following
88 commands as the <systemitem class="username">root</systemitem> user:</para>
89
90<screen role='root'><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &amp;&amp;
91install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/</userinput></screen>
92-->
93
94 </sect2>
95
96 <sect2 role="commands">
97 <title>Command Explanations</title>
98
99 <para>
100 <parameter>--libexecdir=/lib/dhcpcd</parameter>: The default
101 <filename class="directory">/libexec</filename> is not FHS-compliant.
102 Since this directory may need to be available early in the boot,
103 <filename class="directory">/usr/libexec</filename> cannot be used either.
104 </para>
105
106 <para>
107 <parameter>--dbdir=/var/tmp</parameter>: The default
108 <filename class="directory">/var/lib</filename> is not FHS-compliant
109 </para>
110
111 <para>
112 <option>--with-hook=...</option>: You can optionally install more hooks,
113 for example to install some configuration files such as
114 <filename>ntp.conf</filename>. The set of hooks is in the
115 <filename class="directory">dhcpcd-hooks</filename> directory in the
116 build tree.
117 </para>
118 </sect2>
119
120 <sect2 role="configuration">
121 <title>Configuring dhcpcd</title>
122
123 <sect3 id="dhcpcd-config">
124 <title>Config Files</title>
125
126 <para><filename>/etc/dhcpcd.conf</filename></para>
127
128 <indexterm zone="dhcpcd dhcpcd-config">
129 <primary sortas="e-etc-dhcpcd-dhcpcd-conf">/etc/dhcpcd/dhcpcd.conf</primary>
130 </indexterm>
131
132 </sect3>
133
134 <sect3 id="dhcpcd-init">
135 <title>General Configuration Information</title>
136
137 <para>
138 If you want to configure network interfaces at boot using
139 <command>dhcpcd</command>, you need to install the
140 systemd unit included in <xref linkend="bootscripts"/>
141 package by running the following command as the
142 <systemitem class="username">root</systemitem> user:
143 </para>
144
145<screen role="root"><userinput>make install-dhcpcd</userinput></screen>
146
147 <indexterm zone="dhcpcd dhcpcd-init">
148 <primary sortas="f-dhcpcd">dhcpcd</primary>
149 </indexterm>
150
151 <para>
152 Whenever <command>dhcpcd</command> configures or shuts down
153 a network interface, it executes hook scripts. For more details
154 about those scripts, see the <command>dhcpcd-run-hooks</command> and
155 <command>dhcpcd</command> man pages.
156 </para>
157
158 <note>
159 <para id="dhcpcd-config3">
160 The default behavior of <command>dhcpcd</command> sets the
161 hostname and mtu settings. It also overwrites
162 <filename>/etc/resolv.conf</filename> and
163 <filename>/etc/ntp.conf</filename>.
164
165 These modifications to system files and settings on system
166 configuration files are done by hooks which are stored in
167 <filename class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
168
169 Setup <command>dhcpcd</command> by removing or adding hooks from/to
170 that directory. The execution of hooks can be disabled by using the
171 <option>--nohook</option> (<option>-C</option>) command line option or
172 by the <option>nohook</option> option in the
173 <filename>/etc/dhcpcd.conf</filename> file.
174 </para>
175 </note>
176
177 <indexterm zone="dhcpcd dhcpcd-config3">
178 <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
179 </indexterm>
180
181 <para>
182 At this point you can test if <command>dhcpcd</command> is
183 behaving as expected by running the following command as the
184 <systemitem class="username">root</systemitem> user:
185 </para>
186
187<screen role="root"><userinput>systemctl start dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
188
189 <para>
190 To start <command>dhcpcd</command> on a specific interface
191 at boot, enable the previously installed systemd unit by
192 running the following command as the
193 <systemitem class="username">root</systemitem> user:
194 </para>
195
196<screen role="root"><userinput>systemctl enable dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
197
198 <para>
199 Replace <replaceable>eth0</replaceable> with the actual interface name.
200 </para>
201
202 </sect3>
203
204 </sect2>
205
206 <sect2 role="content">
207 <title>Contents</title>
208
209 <segmentedlist>
210 <segtitle>Installed Programs</segtitle>
211 <segtitle>Installed Libraries</segtitle>
212 <segtitle>Installed Directories</segtitle>
213
214 <seglistitem>
215 <seg>dhcpcd</seg>
216 <seg>None</seg>
217 <seg>/lib/dhcpcd</seg>
218 </seglistitem>
219 </segmentedlist>
220
221 <variablelist>
222 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
223 <?dbfo list-presentation="list"?>
224 <?dbhtml list-presentation="table"?>
225
226 <varlistentry id="dhcpcd-prog">
227 <term><command>dhcpcd</command></term>
228 <listitem>
229 <para>is an implementation of the DHCP client specified
230 in RFC2131.</para>
231 <indexterm zone="dhcpcd dhcpcd-prog">
232 <primary sortas="b-dhcpcd">dhcpcd</primary>
233 </indexterm>
234 </listitem>
235 </varlistentry>
236
237 </variablelist>
238
239 </sect2>
240
241</sect1>
Note: See TracBrowser for help on using the repository browser.