mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-04 07:17:15 +08:00
1af021dc84
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2248 af4574ff-66df-0310-9fd7-8a98e5e911e0
43 lines
1.6 KiB
XML
43 lines
1.6 KiB
XML
<sect2>
|
|
<title>Configuring <application>dhcpcd</application></title>
|
|
|
|
<sect3><title>Config files</title>
|
|
<para><filename>/var/lib/dhcpc/*</filename></para></sect3>
|
|
|
|
<sect3><title>Configuration Information</title>
|
|
|
|
<para>To configure <command>dhcpcd</command>, you need to first install
|
|
the network service script,
|
|
<filename>/etc/sysconfig/network-devices/services/dhcpcd</filename>
|
|
included in the <xref linkend="intro-important-bootscripts"/> package.</para>
|
|
|
|
<screen><userinput><command>make install-service-dhcpcd</command></userinput></screen>
|
|
|
|
<para>Now create the <filename>ifconfig.eth0</filename> configuration
|
|
file using the following commands. Adjust appropriately for additional
|
|
interfaces.</para>
|
|
|
|
<para><emphasis>Note:</emphasis> This will overwrite any existing file.</para>
|
|
|
|
<screen><userinput><command>cat > /etc/sysconfig/network-devices/ifconfig.eth0 << "EOF"</command>
|
|
ONBOOT=yes
|
|
DHCP_START="<replaceable>[insert appropriate start options here]</replaceable>"
|
|
DHCP_STOP="-k <replaceable>[insert other stop options here]</replaceable>"
|
|
SERVICE=dhcpcd
|
|
<command>EOF</command></userinput></screen>
|
|
|
|
<para>For more information on the appropriate
|
|
<envar>DHCP_START</envar> and <envar>DHCP_STOP</envar>
|
|
values, examine the man page for <command>dhcpcd</command>.</para>
|
|
|
|
<para>Finally, if the <acronym>DHCP</acronym> configured interface is
|
|
used as your default gateway, you should remove the GATEWAY and GATEWAY_IF
|
|
variables from <filename>/etc/sysconfig/network</filename>: </para>
|
|
|
|
<screen><userinput><command>sed -i "s/GATEWAY/#&/" /etc/sysconfig/network</command></userinput></screen>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|