From 7db2c3c6f3d9e86f13039a8b20bd815ea3244ad6 Mon Sep 17 00:00:00 2001 From: oddlama Date: Mon, 12 Oct 2020 01:18:39 +0200 Subject: [PATCH] Add systemd networking config --- scripts/main.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/main.sh b/scripts/main.sh index 6cfaac9..b23c7d6 100755 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -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