Author: Daniel Reurich Date: To: dng@lists.dyne.org Subject: Re: [DNG] Purpose of an OS: was network device naming
On 03/10/15 20:49, Simon Hobson wrote: > poitr pogo <lepoitr@???> wrote:
>
>>> I thought it was stupid for other reasons, but now that you
>>> mention it,
>>
>>> yeah, naming it after the particular slot into which it's plugged
>>> in is stupid, and if you take the box apart and move things
>>> around, you can break your OS.
>>>
>>
>> no. it is not stupid. it is the most reasonable way. one can
>> replace a part and do not have to touch any system config.
>
> And the flip side is that you can't move anything without the name
> changing. Plug the USB-[ethernet|wifi] adapter into a different
> orifice and it's now got a different name. Move an ethernet card
> because you want that slot for something different and it's now got a
> different name.
>
>> device by manufactuter name or model name or serial. this is
>> stupid.
>
> No more or less stupid than by physical location. Eg, taking the
> above mentioned USB adapter - if you use it's serial number then it
> keeps it's name regardless of which socket it's plugged into, vs
> changing name depending on where it's plugged in.
>
> Lets face it - there is no "right" answer to this other than a system
> with enough intelligence to read the user/admin's mind and work out
> what they intend to happen - and I think we're a bit off that yet !
> Looking back, I think I've "moved" something at least as often as
> I've replaced it with a different something in the same location -
> probably more in fact.
> Actually, I think there is a sane solution to this that would provide
consistent names for certain devices. Both device hardware id and
location are important but either may change without renaming the device
- with constraints.
The way to do this is to record both the devices hardware identifiers
(at least mac address and device type) as well as location. For network
cards, if the mac address remains the same and the card is moved then
the device shouldn't be renamed.
If the device is replaced by another device of the same function (ie;
network card) in the same slot then give it the same name as the old
card in that slot.
Additional rules for usb network interfaces, modems and wifi could be
easily created to give consistent documented behaviour. I think this is
the key to solving these sorts of gripes. Make the best default
behaviours, and document them properly so that anybody that
wants/expects different behaviour at least has some chance of working
around it or changing the default behaviour.