summaryrefslogtreecommitdiff
path: root/netcfg
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-04-26 20:34:14 +0200
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-04-27 11:28:46 +0200
commit0ded4765344b6360cf4f030909d5bbe736a1a584 (patch)
treea9f56a14fa1b278f3c58bfe11ef6ed9394253459 /netcfg
parent59731dd69bb4be66c721b3de66fb2ab80bec3e7e (diff)
Add optional script for persistent network interface renaming
Add a new service that runs a small helper script that applies a consistent, deterministic naming pattern to all interfaces, based on their mac address. A configuration file with wild card pattern matching can be used for determining names. By default, this is disabled. Also, this script is Linux specific. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'netcfg')
-rw-r--r--netcfg/ifrename13
1 files changed, 13 insertions, 0 deletions
diff --git a/netcfg/ifrename b/netcfg/ifrename
new file mode 100644
index 0000000..08909fa
--- /dev/null
+++ b/netcfg/ifrename
@@ -0,0 +1,13 @@
+#
+# Interface renaming rules
+#
+# Format: NAME,MAC,NEWNAME
+#
+# NAME and MAC are shell glob patterns. Both must match for a rule to apply.
+# The first matching rule is chosen (top to bottom).
+#
+# Interfaces with the same NEWNAME are sorted by MAC and have a running
+# index appended to their new name.
+#
+# Example: rename all ethernet interfaces to "port<X>"
+# eth*,*,port