First install the service from the CLFS Bootscripts package:
tar -xvf bootscripts-cross-lfs-1.2-pre11.tar.bz2 cd bootscripts-cross-lfs-1.2-pre11 make install-service-dhcpcd
Finally, create the
/etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd
configuration file using the following commands. Adjust appropriately for
additional interfaces:
cd /etc/sysconfig/network-devices &&
mkdir -v ifconfig.eth0 &&
cat > ifconfig.eth0/dhcpcd << "EOF"
ONBOOT="yes"
SERVICE="dhcpcd"
# Start Command for DHCPCD
DHCP_START="-q"
# Stop Command for DHCPCD
DHCP_STOP="-k"
EOFThe values of these variables must be changed in every file to match
the proper setup. If the ONBOOT variable is set to
“yes” the network script will bring up the Network Interface
Card (NIC) during booting of the system. If set to anything but
“yes” the NIC will be ignored by the network script and not
be brought up.
The SERVICE variable defines the method used for
obtaining the IP address. The CLFS-Bootscripts package has a modular IP
assignment format, and creating additional files in the /etc/sysconfig/network-devices/services
directory allows other IP assignment methods.
The DHCP_START and DHCP_STOP variables
arguments that are passed onto dhcpcd when starting
and stoppping the service. More information about what can be passed can
be found in the dhcpcd(8) man page.
To configure another Static Interface, Follow Section 12.5, “Static Networking Configuration”.