From 0d67870667ee8c2084dea2bbdf1323288e2e7457 Mon Sep 17 00:00:00 2001 From: David Runge Date: Sat, 30 May 2020 20:58:48 +0200 Subject: Replacing dhcpcd with systemd-networkd and systemd-resolved configs/releng/airootfs/etc/udev/rules.d/81-dhcpcd.rules: Removing the udev rule for starting dhcpcd@.service on interfaces of the form eth* and en*. configs/releng/airootfs/etc/systemd/network/{ethernet,wireless}.network: Adding default DHCP configurations for en*, eth*, wlp* and wlan* interfaces. configs/releng/airootfs/etc/resolv.conf: Adding a symlink from /run/systemd/resolve/stub-resolv.conf to /etc/resolv.conf (in airootfs). configs/releng/airootfs/root/customize_airootfs.sh: Adding systemd-networkd and systemd-resolved to the list of services that are being enabled during airootfs customization. --- configs/releng/airootfs/etc/resolv.conf | 1 + configs/releng/airootfs/etc/systemd/network/ethernet.network | 11 +++++++++++ configs/releng/airootfs/etc/systemd/network/wireless.network | 11 +++++++++++ configs/releng/airootfs/etc/udev/rules.d/81-dhcpcd.rules | 1 - configs/releng/airootfs/root/customize_airootfs.sh | 2 +- 5 files changed, 24 insertions(+), 2 deletions(-) create mode 120000 configs/releng/airootfs/etc/resolv.conf create mode 100644 configs/releng/airootfs/etc/systemd/network/ethernet.network create mode 100644 configs/releng/airootfs/etc/systemd/network/wireless.network delete mode 100644 configs/releng/airootfs/etc/udev/rules.d/81-dhcpcd.rules diff --git a/configs/releng/airootfs/etc/resolv.conf b/configs/releng/airootfs/etc/resolv.conf new file mode 120000 index 0000000..3639662 --- /dev/null +++ b/configs/releng/airootfs/etc/resolv.conf @@ -0,0 +1 @@ +/run/systemd/resolve/stub-resolv.conf \ No newline at end of file diff --git a/configs/releng/airootfs/etc/systemd/network/ethernet.network b/configs/releng/airootfs/etc/systemd/network/ethernet.network new file mode 100644 index 0000000..5e9f0b7 --- /dev/null +++ b/configs/releng/airootfs/etc/systemd/network/ethernet.network @@ -0,0 +1,11 @@ +[Match] +Name=en* +Name=eth* + +[Network] +DHCP=ipv4 +IPv6PrivacyExtensions=yes +IPv6AcceptRA=false + +[DHCP] +RouteMetric=512 diff --git a/configs/releng/airootfs/etc/systemd/network/wireless.network b/configs/releng/airootfs/etc/systemd/network/wireless.network new file mode 100644 index 0000000..5a6da15 --- /dev/null +++ b/configs/releng/airootfs/etc/systemd/network/wireless.network @@ -0,0 +1,11 @@ +[Match] +Name=wlp* +Name=wlan* + +[Network] +DHCP=ipv4 +IPv6PrivacyExtensions=yes +IPv6AcceptRA=false + +[DHCP] +RouteMetric=1024 diff --git a/configs/releng/airootfs/etc/udev/rules.d/81-dhcpcd.rules b/configs/releng/airootfs/etc/udev/rules.d/81-dhcpcd.rules deleted file mode 100644 index 1c4053c..0000000 --- a/configs/releng/airootfs/etc/udev/rules.d/81-dhcpcd.rules +++ /dev/null @@ -1 +0,0 @@ -ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="en*|eth*", ENV{SYSTEMD_WANTS}="dhcpcd@$name.service" diff --git a/configs/releng/airootfs/root/customize_airootfs.sh b/configs/releng/airootfs/root/customize_airootfs.sh index 5a732c8..ecd3b57 100755 --- a/configs/releng/airootfs/root/customize_airootfs.sh +++ b/configs/releng/airootfs/root/customize_airootfs.sh @@ -21,5 +21,5 @@ sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf -systemctl enable pacman-init.service choose-mirror.service +systemctl enable pacman-init.service choose-mirror.service systemd-networkd.service systemd-resolved.service systemctl set-default multi-user.target -- cgit v1.2.3-70-g09d2