Post-install and activate dhcpcd

Post-install and activate dhcpcd 1:

Creating a restore point

Create a restore point before making a major system change or installing programs (see: Restore options).

This chapter describes how dhcpcd can also be post-installed and activated under older TwinCAT/BSD versions. For this purpose, the file /etc/rc.conf must be extended by some entries or certain entries must be removed. With each installation, the pkg program checks whether the local data stock matches that on the Package Server; it is updated if necessary.

Proceed as follows:

1. Enter the doas pkg install dhcpcd command in the console.
2. Confirm the installation with [y], so that the package is retrieved from the repository and installed on the system.
3. Enter doas ee /etc/rc.conf in the console.
The file rc.conf opens in the editor.
4. Remove the line ifconfig_DEFAULT="DHCP" to disable the older DHCP client. Notice The older dhclient and dhcpcd must not be configured at the same time, because the two services interfere with each other.
5. Remove the entry background_dhclient="YES" and continue to clean the configuration file.
6. Add the following lines to the configuration file.
dhcpcd_enable="YES"
dhcpcd_flags="--waitip"
7. Press [Esc] and select the option a) leave editor and subsequently a) save changes.
Restart the system with shutdown -r now for the changes to take effect. Then dhcpcd is ready for use. If the IP address is not to be obtained via DHCP, then a fixed IP address can be set in the next step (see: Set IP address (dhcpcd)).