summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Opaniuk <igor.opaniuk@toradex.com>2020-04-16 17:55:26 +0300
committerIgor Opaniuk <igor.opaniuk@toradex.com>2020-04-16 20:55:08 +0300
commit02b8668e7f49d163f48e879c51a0d2be34196ab3 (patch)
tree4e680a0dba32fc33a8aea4c3494b7dea2711fee1
parent00b3a4673701ace5584bb1c2926a83b1c530015a (diff)
systemd-conf: change wired network configuration for systemd-networkd
Disable configuration of wired interfaces by systemd-networkd. Also provide an option which will force to keep ip configuration in case of critical connection (rootfs mounted via nfs etc.). Relates-to: ELB-2610 Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
-rw-r--r--recipes-core/systemd/systemd-conf/wired.network11
-rw-r--r--recipes-core/systemd/systemd-conf_%.bbappend1
2 files changed, 12 insertions, 0 deletions
diff --git a/recipes-core/systemd/systemd-conf/wired.network b/recipes-core/systemd/systemd-conf/wired.network
new file mode 100644
index 0000000..ea73cc4
--- /dev/null
+++ b/recipes-core/systemd/systemd-conf/wired.network
@@ -0,0 +1,11 @@
+[Match]
+Name=disabled_en* disabled_eth*
+KernelCommandLine=!nfsroot
+
+[Network]
+DHCP=yes
+
+[DHCP]
+CriticalConnection=true
+RouteMetric=10
+ClientIdentifier=mac
diff --git a/recipes-core/systemd/systemd-conf_%.bbappend b/recipes-core/systemd/systemd-conf_%.bbappend
new file mode 100644
index 0000000..77ab59d
--- /dev/null
+++ b/recipes-core/systemd/systemd-conf_%.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/systemd-conf:"