El 06/10/21 a las 12:28, Martin-Éric Racine escribió:
> ke 6. lokak. 2021 klo 12.20 Santiago Ruano Rincón
> (santiag...@riseup.net) kirjoitti:
> >
> > El 06/10/21 a las 09:24, Martin-Éric Racine escribió:
> > > la 2. lokak. 2021 klo 11.13 Michael Biebl (bi...@debian.org) kirjoitti:
> > > >
> > > > Am 02.10.21 um 09:05 schrieb Martin-Éric Racine:
> > > > > pe 1. lokak. 2021 klo 23.39 Santiago Ruano Rincón
> > > > > (santiag...@riseup.net) kirjoitti:
> > > > >>
> > > > >> El 01/10/21 a las 17:05, Martin-Éric Racine escribió:
> > > > >>> pe 1. lokak. 2021 klo 16.21 Santiago Ruano Rincón
> > > > >>> (santiag...@riseup.net) kirjoitti:
> > > > >>>> On Wed, 17 Feb 2021 14:32:24 +0200 Martin-Éric_Racine 
> > > > >>>> <martin-eric.rac...@iki.fi> wrote:
> > > > >>>>> Package: ifupdown
> > > > >>>>> Version: 0.8.36
> > > > >>>>> Severity: normal
> > > > >>>>>
> > > > >>>>> -----BEGIN PGP SIGNED MESSAGE-----
> > > > >>>>> Hash: SHA256
> > > > >>>>>
> > > > >>>>> The regex recipe below does not work as expected. I've tried both
> > > > >>>>>
> > > > >>>>> allow-hotplug /en*=en /wl*=wl
> > > > >>>>>
> > > > >>>>> and
> > > > >>>>>
> > > > >>>>> allow-hotplug /en*/=en /wl*/=wl
> > > > >>>>>
> > > > >>>>> but ifup still doesn't raise whatever interface match the regex. 
> > > > >>>>> Have I misunderstood the examples or am I missing something else?
> > > > >>>>>
> > > > >>>>> Thanks!
> > > > >>>>>
> > > > >>>>> - -- Package-specific info:
> > > > >>>>> - --- /etc/network/interfaces:
> > > > >>>>> allow-hotplug /en*=en /wl*=wl
> > > > >>>>>
> > > > >>>>> iface en inet dhcp
> > > > >>>>> iface en inet6 auto
> > > > >>>>>          privext 2
> > > > >>>>>          #dhcp 1
> > > > >>>>>
> > > > >>>>> iface wl inet dhcp
> > > > >>>>>          wpa-ssid AccessPoint
> > > > >>>>>          wpa-psk mypassword
> > > > >>>>> iface wl inet6 auto
> > > > >>>>>          privext 2
> > > > >>>>>          #dhcp 1
> > > > >>>
> > > > >>> [...]
> > > > >>>
> > > > >>>> I get both interfaces configured. Could you please run ifup with 
> > > > >>>> -v?
> > > > >>>
> > > > >>> I just tried. Here's an interesting difference:
> > > > >>>
> > > > >>> If I use 'sudo ifup -a -v' ifup won't find the mapped interfaces.
> > > > >>
> > > > >> ifup doesn't process them since they are not configured with `auto`
> > > > >
> > > > > OK, what processes interfaces with allow-hotplug then, if not 
> > > > > ifupdown?
> > > > >
> > > > >> s/allow-hotplug/auto/ in my /e/n/interfaces makes this work.
> > > > >>>
> > > > >>> If I use 'sudo ifup --allow hotplug -a -v' ifup correctly finds and
> > > > >>> maps the wireless interfaces.
> > > > >>>
> > > > >>
> > > > >> I wonder if there is a problem related with udev instead.
> > > > >
> > > > > Added udev (systemd) maintainers in CC.
> > > >
> > > > If you are referring to
> > > > /lib/udev/ifupdown-hotplug and /lib/udev/rules.d/80-ifupdown.rules,
> > > > those files are maintained by the ifupdown package.
> > > >
> > > > The systemd package is not involved here.
> > >
> > > Michael, I suspected as much. Thanks for confirming this.
> > >
> > > Santiago, all evidences point to ifupdown pattern matching only
> > > working for auto interfaces, but not hotplug interfaces.
> >
> > Not exactly, I think. 'sudo ifup --allow hotplug -a -v' works for you.
> 
> I should not have to type that manually to have ifupdown find and
> raise the interfaces.
> 
> > > Basically,
> > > hotplug works for named interfaces, but not for pattern matched
> > > interfaces.
> >
> > ifupdown-hotplug receives as argument the name of the real
> > interface, so it execs ifup --allow=hotplug $INTERFACE
> > https://salsa.debian.org/debian/ifupdown/-/blob/master/debian/ifupdown-hotplug#L73
> > and it wouldn't find it in your configuration.
> 
> Which is precisely the problem. The mapping fails.
> 
> > Maybe your use case matches better templates and inherits (See INTERFACE
> > TEMPLATES) in interfaces(5).
> 
> It doesn't. Templates rely upon explicitly defining interfaces.

OK, I see.

So the problem is not explicitly related to ifupdown. With the same
config from above, this does not work:

    $ sudo ifup eth1
    ifup: unknown interface eth1

You expect that ifupdown matches an interface given as argument to the
lists of interfaces in auto, allow-hotplug, etc, even without defining
them, as long as they are known by the kernel.

Attachment: signature.asc
Description: PGP signature

Reply via email to