summaryrefslogtreecommitdiff
path: root/src/systemd
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-10-07 19:56:37 +0200
committerChristian Breunig <christian@breunig.cc>2026-10-31 09:58:29 +0000
commitc73faac7f95ec837da6f964d15cc05ff9ffd2de6 (patch)
treee78c29e0df1c817a8ab20c3a32d558ac98d2c869 /src/systemd
parent552ade702fc033f68cda998055bd5b74f195c7ac (diff)
downloadvyos-1x-c73faac7f95ec837da6f964d15cc05ff9ffd2de6.tar.gz
vyos-1x-c73faac7f95ec837da6f964d15cc05ff9ffd2de6.zip
interfaces: T3871: name interfaces from a slot-anchored mapping store
Names used to be derived from 'hw-id' in config.boot. A node carrying an address but no hw-id had to be matched to some NIC, and nothing available at boot could say which one - every heuristic could bind a configured address to the wrong physical wire. Naming authority moves to a mapping store binding a name to the slot the hardware occupies. The slot is the identity, so a replacement card in that slot is that interface again. The store renders systemd .link files, leaving udev to apply names as devices appear.
Diffstat (limited to 'src/systemd')
-rw-r--r--src/systemd/vyos-net-name-resolve.service15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/systemd/vyos-net-name-resolve.service b/src/systemd/vyos-net-name-resolve.service
new file mode 100644
index 000000000..c3563dd84
--- /dev/null
+++ b/src/systemd/vyos-net-name-resolve.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=VyOS persistent interface naming
+Documentation=man:vyos-net-name-resolve.py(8)
+
+# Started by vyos-router once the config directory is mounted - for an
+# encrypted volume that is only after it has been unlocked - so this can not
+# be ordered independently.
+DefaultDependencies=no
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/libexec/vyos/system/vyos-net-name-resolve.py
+TimeoutStartSec=90
+StandardOutput=journal+console