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