:: [devuan-dev] eudev net.ifnames logi…
Top Page
Delete this message
Reply to this message
Author: Ivan J.
Date:  
To: devuan-dev
New-Topics: [DNG] Proposed change in behaviour for ascii: eudev net.ifnames logic reversing proposal
Subject: [devuan-dev] eudev net.ifnames logic reversing proposal
We've been talking about this before, but agreed not to put it in
production before consensus is reached.

The eudev package (currently found in the experimental repos and at
https://git.devuan.org/devuan-packages/eudev ) utilizes the same logic
like udev does when it comes to interface naming schemes. The patch
appended below would reverse the logic and make it opt-in rather than
opt-out.

This would lead network interface names default to the old "eth0" or
"wlan0" scheme, rather than the new(?) "enp0s3"-like scheme. It implies
having "net.ifnames=1" in the kernel cmdline to get the "enp0s3"-like
scheme and not touching anything to get the "eth0" scheme.

If there are no objections until wednesday, I'd push this trivial, but
important to discuss patch to the package and build it for the
repositories. Please see the patch below:

---

diff --git a/rules/80-net-name-slot.rules b/rules/80-net-name-slot.rules
index c5f1b3885..4738e533f 100644
--- a/rules/80-net-name-slot.rules
+++ b/rules/80-net-name-slot.rules
@@ -5,7 +5,7 @@ SUBSYSTEM!="net", GOTO="net_name_slot_end"
NAME!="", GOTO="net_name_slot_end"

IMPORT{cmdline}="net.ifnames"
-ENV{net.ifnames}=="0", GOTO="net_name_slot_end"
+ENV{net.ifnames}!="1", GOTO="net_name_slot_end"

NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}"
NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}"

--
~ parazyd
GnuPG: 03337671FDE75BB6A85EC91FB876CB44FA1B0274
GnuPG: https://parazyd.cf/FA1B0274.asc