summaryrefslogtreecommitdiff
path: root/config-parabola-mgmt-networkd.PKGBUILD
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@datawire.io>2021-06-17 23:50:52 -0600
committerLuke Shumaker <lukeshu@datawire.io>2021-06-17 23:50:52 -0600
commit09f2d3dba2da3df9e1cd6df2ec114b113a40f3a2 (patch)
treec32e562ab889276b928b950abec9585cb98275c2 /config-parabola-mgmt-networkd.PKGBUILD
parentc3369a90de8d868aa91d948fe5d5a1c3bcae1473 (diff)
Start switching over to resolved and networkd
Diffstat (limited to 'config-parabola-mgmt-networkd.PKGBUILD')
-rw-r--r--config-parabola-mgmt-networkd.PKGBUILD36
1 files changed, 36 insertions, 0 deletions
diff --git a/config-parabola-mgmt-networkd.PKGBUILD b/config-parabola-mgmt-networkd.PKGBUILD
new file mode 100644
index 0000000..98b60dc
--- /dev/null
+++ b/config-parabola-mgmt-networkd.PKGBUILD
@@ -0,0 +1,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
+}