Web lists-archives.com

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




On Wed, Jul 19, 2017 at 11:32:38PM +0200, Adam Borowski wrote:

> Well, but on the way up, /eth0/=en0 or mac/.../=en0 will match logical
> interface "en0", and on the way down, and subsequent manual ups, it will
> match the kernel name "en0".  Am I missing something?

Yes, /eth0/=en0 will match kernel name eth0, both up and down. On up, it
will configure eth0 with the iface en0 stanza. On down, it deconfigures
it based on the stanza it was brought up with.

This also allows something like:

auto /eth*/=eth
iface eth inet dhcp

When doing ifup -a, this will bring up all eth* interfaces with DHCP.
But you can also ifup/ifdown each individual interface that matches eth*
by its kernel name.

> > rename mac/00:16:0a:26:99:c6/=en0
> > auto en0
> > iface en0 ...
> 
> Slightly more typing, but that'd work, too.

In 0.8.21 I added an undocumented feature:

iface en0 ...
	auto

Is equivalent to:

auto en0
iface en0 ...

-- 
Met vriendelijke groet / with kind regards,
      Guus Sliepen <guus@xxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature