summaryrefslogtreecommitdiff
path: root/config-parabola-mgmt-networkd.PKGBUILD
blob: 98b60dc28a3adcae8400a15c66b48969471b5772 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
. ${BUILDFILE%/*}/common.sh
pkgver=20210617

package() {
preamble
pkgdesc="Parabola server configuration: Automatic networkd for ethernet devices"
provides+=(config-parabola-mgmt-dhcpcd)
conflicts+=(config-parabola-mgmt-dhcpcd)
depends+=(config-parabola-mgmt-resolved)

# ##### networking

# We install a wildcard rule to automatically do DHCP on each ethernet
# interface, to avoid any manual configuration of networking, that
# could change if the host VM changes.
add-file etc/systemd/network/ethernet.network <<-'EOF'
	[Match]
	Name=en*
	Name=eth*

	[Network]
	DHCP=ipv4
	IPv6PrivacyExtensions=yes
	IPv6AcceptRA=false

	[DHCP]
	RouteMetric=512
	EOF

add-unit etc/systemd/system/multi-user.target.wants/systemd-networkd.service                                    # base
add-unit etc/systemd/system/sockets.target.wants/systemd-networkd.socket                                        # Also=
add-unit etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service                    # Also=
ln -s /usr/lib/systemd/system/systemd-networkd.service etc/systemd/system/dbus-org.freedesktop.network1.service # Alias=

postamble
}