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.
This commit is contained in:
David Runge 2020-05-30 20:58:48 +02:00
parent 769fbecef3
commit 0d67870667
No known key found for this signature in database
GPG Key ID: 7258734B41C31549
5 changed files with 24 additions and 2 deletions

View File

@ -0,0 +1 @@
/run/systemd/resolve/stub-resolv.conf

View File

@ -0,0 +1,11 @@
[Match]
Name=en*
Name=eth*
[Network]
DHCP=ipv4
IPv6PrivacyExtensions=yes
IPv6AcceptRA=false
[DHCP]
RouteMetric=512

View File

@ -0,0 +1,11 @@
[Match]
Name=wlp*
Name=wlan*
[Network]
DHCP=ipv4
IPv6PrivacyExtensions=yes
IPv6AcceptRA=false
[DHCP]
RouteMetric=1024

View File

@ -1 +0,0 @@
ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="en*|eth*", ENV{SYSTEMD_WANTS}="dhcpcd@$name.service"

View File

@ -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