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

Re: iwd + systemd-networkd + resolvconf wrinkles



On Sat 19 Mar 2022 at 10:12:54 -0500, Nicholas Geovanis wrote:

> On Sat, Mar 19, 2022 at 7:33 AM Brian <ad44@cityscape.co.uk> wrote:
> 
> > On Fri 18 Mar 2022 at 20:57:38 +0000, Brian wrote:
> >
> > > On Sun 13 Mar 2022 at 20:04:06 -0500, David Wright wrote:
> > >
> > > [...]
> > >
> > > > Install iwd, and resolvconf if necessary. You may then need to reboot
> > > > if the wifi interface has already been renamed by the kernel, ie if
> > > > it's not wlan0. (With buster, there's a missing file that needs adding
> > > > first; see below).
> > >
> > > It is systemd/udev that renames the interface. This is standard
> > > procedure. iwd decides it knows better and, no matter what, does
> > > it. I have never met this sort of behavior with wpasupplicant.
> > >
> > > So we will be more forceful and have
> > >
> > >   net.ifnames=1
> > >
> > > on GRUB's kernel command line. My choice is ignored by iwd. Why does
> > > it not want an interface to be renamed by systemd/udev?
> >
> > Now sorted:
> >
> >   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941652
> 
> 
> Surprised to see that took 25 months to sort out.
> And a little surprised to read this written by M. Biebl on 4 Nov 2019:
> "So the mere fact that iwd was installed changed the way the interfaces
> are named. You don't actually have to enable/start iwd."
> 
> ....because that does not follow the so-called "Principle of Least
> Surprise".

Upstrem iwd has decided on the direction it wants to take and, by
closing the bug report, so has Debian. There seems little point in
pursuing it further via those channels.

I have limited skill with systemd but devised a service to rename
the interface and integrate with ifupdown.

 [Unit]
 Description=Rename wlan0. Use ifupdown.
 Requires=iwd.service
 After=iwd.service

 [Service]
 ExecStartPre=/usr/bin/sleep 2
 ExecStartPre=/sbin/ip link set wlan0 down ; /sbin/ip link set wlan0 name wlx74ea3a93adab ; /sbin/ip link set wlx74ea3a93adab up
 ExecStart=/sbin/ifup wlx74ea3a93adab

 [Install]
 WantedBy=multi-user.target

/e/n/i can now be used as originally written.

-- 
Brian.



Reply to: