From 0ded4765344b6360cf4f030909d5bbe736a1a584 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 26 Apr 2018 20:34:14 +0200 Subject: 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 --- netcfg/ifrename | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 netcfg/ifrename (limited to 'netcfg/ifrename') 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" +# eth*,*,port -- cgit v1.2.3