:: Re: [DNG] Proposed change in behavi…
Kezdőlap
Delete this message
Reply to this message
Szerző: Steve Litt
Dátum:  
Címzett: dng
Tárgy: Re: [DNG] Proposed change in behaviour for ascii: eudev net.ifnames logic reversing proposal
On Sun, 20 Aug 2017 16:38:18 +0100
Rowland Penny <rpenny@???> wrote:

> On Sun, 20 Aug 2017 17:18:13 +0200
> Adam Borowski <kilobyte@???> wrote:


> > You can't safely rename to eth0/wlan0. At bootup, when an interface
> > is being cold/hot-plugged, an *udev script is run. When that script
> > decides that the interface that it's been called for should be
> > "eth1", it is possible (during boot-up, likely) that another
> > interface pops up, and the kernel gives it the next name in
> > sequence, ie, "eth1". And the result is not pretty.
>
> OK, when you put it like that, I can understand using a different name
> space, but remember you are also dealing with human beings so whatever
> name is used, it must be meaningful and the systemd ones aren't.


As a wee lad, my mentors told me never to put two of the same model
NICs in a computer, because which one became eth0 and which became eth1
would be indeterminate from boot to boot. That's horrible, and that *is*
solved by the systemd naming scheme.

On the other hand, nobody likes wlo1P2X4SYSTEMDSUX02 as a device name.
And also, if it's plugged into a USB and you plug it into a different
USB port, its name changes and all scripts break. Have you ever tried
to explain to a 90 year old man that he must ALWAYS plug the dongle
into THIS USB port exclusively, when the guy's vision is so bad he
can't even see the hole? It's difficult: I had to do it.

Maybe a year ago I submitted a very rough shellscript to grab your wifi
device name and return it. Somebody else on the list improved it. It
would be very very easy to keep the Freedesktop.Org names, but run a
script which populates the following environment vars:

#FOR SINGLE WIFI AND ETH DEVICES
$eth0=enop1
$wlan0=wl52po45tldnr

The preceding covers the vast majority of setups. For those with
multiple network interfaces, the scheme gets just a little more
complicated...


#FOR MULTIPLES OF EITHER
$eth0of2=enop1
$eth1of2=enPdqr0xoPOETTERPUFF

$wlan0of2=wl52po45tldnr
$wlan1of2=wlpt01

Just export those env vars into all process trees requiring networks
interface names, and you've got it made. I see this as the best of both
worlds, and it requires no changes to udev or eudev or the kernel or
anything.

SteveT

Steve Litt
July 2017 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz