dhcpcd is an implementation of the DHCP client specified in RFC2131. A DHCP client is useful for connecting your computer to a network which uses DHCP to assign network addresses. dhcpcd strives to be a fully featured, yet very lightweight DHCP client.
This package is known to build and work properly using an LFS-7.4 platform.
Download (HTTP): http://roy.marples.name/downloads/dhcpcd/dhcpcd-6.0.5.tar.bz2
Download (FTP): ftp://ftp.osuosl.org/pub/gentoo/distfiles/dhcpcd-6.0.5.tar.bz2
Download MD5 sum: a65ed99460a61f42c05f652c2eaafe7c
Download size: 112 KB
Estimated disk space required: 2.3 MB
Estimated build time: less than 0.1 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/dhcpcd
Install dhcpcd by running the following commands:
./configure --libexecdir=/lib/dhcpcd \
--dbdir=/run \
--sysconfdir=/etc &&
make
This package does not come with a test suite.
Now, as the root user:
make install
By default, a plain text lease info file isn't created but the
dhcpcd provides a hook which can
be used for creating such a file. Install the hook by running the
following commands as the root
user:
sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat && install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/
To configure dhcpcd, you need to first
install the network service script, /lib/services/dhcpcd included in the blfs-bootscripts-20130908 package (as
user root):
make install-service-dhcpcd
Whenever dhcpcd configures or shuts down a network interface, it executes hook scripts. For more details about those scripts, see the dhcpcd-run-hooks and dhcpcd man pages.
Finally, as the
root user create the /etc/sysconfig/ifconfig.eth0 configuration file
using the following commands. Adjust appropriately for additional
interfaces:
cat > /etc/sysconfig/ifconfig.eth0 << "EOF"
ONBOOT="yes"
IFACE="eth0"
SERVICE="dhcpcd"
DHCP_START="-b -q <insert appropriate start options here>"
DHCP_STOP="-k <insert additional stop options here>"
EOF
For more information on the appropriate DHCP_START and DHCP_STOP values, examine the man page for
dhcpcd.
The default
behavior of dhcpcd sets the hostname and
mtu settings. It also overwrites /etc/resolv.conf and /etc/ntp.conf. These modifications to system
files and settings on system configuration files are done by
hooks which are stored in /lib/dhcpcd/dhcpcd-hooks. Setup dhcpcd by removing or adding
hooks from/to that directory. The execution of hooks can be
disabled by using the --nohook
(-C) command line option or by the
nohook option in the /etc/dhcpcd.conf file.
Review the dhcpcd
man page for switches to add to the DHCP_START value.
Last updated on 2013-09-06 10:46:32 -0700