[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Naming of network devices - how to improve it in buster



On Mon, Jul 17, 2017 at 06:22:14PM +0200, Guus Sliepen wrote:

> > Thus, what about this:
> > auto mac/00:16:0a:26:99:c6/=en0
> > iface en0 inet6 static
> > 	address 3:1415:9265:3589:7932:3846:2643:3832/64
> > 	gateway 3:1415:9265:3589::1
> > 	rename
> > 
> > With the rename command taking an optional argument (the new name) that
> > defaults to the logical name (ie, after =).
> 
> Yes, that should be implementable.

Actually, that is not as easy as it sounds. It works in the above
example because mac/00:16:0a:26:99:c6 would still match en0 after the
rename, but that is not always true. For example, doing auto /eth0/=en0
means the pattern eth0 matches on ifup, but it no longer matches when
you do ifdown. Also, ifupdown supports changing the MAC address of an
interface, so even mac/.../ patterns are problematic.

It's better to split it:

rename mac/00:16:0a:26:99:c6/=en0
auto en0
iface en0 ...

And do the renames whenever ifup is run, before it processes anything
else.

-- 
Met vriendelijke groet / with kind regards,
      Guus Sliepen <guus@debian.org>

Attachment: signature.asc
Description: PGP signature


Reply to: