Add systemd networking config

This commit is contained in:
oddlama 2020-10-12 01:18:39 +02:00
parent a59090ab9d
commit 7db2c3c6f3
No known key found for this signature in database
GPG Key ID: 88EA325D51D53908
1 changed files with 8 additions and 0 deletions

View File

@ -371,6 +371,14 @@ main_install_gentoo_in_chroot() {
enable_service dhcpcd
fi
if [[ $SYSTEMD == "true" ]]; then
# Enable systemd networking and dhcp
enable_service systemd-networkd
enable_service systemd-resolved
echo -n "[Match]\nName=en*\n\n[Network]\nDHCP=yes" > /etc/systemd/network/20-wired-dhcp.network \
|| die "Could not write dhcp network config to '/etc/systemd/network/20-wired-dhcp.network'"
fi
# Install ansible
if [[ $INSTALL_ANSIBLE == "true" ]]; then
install_ansible