On Mar 25 15:52:38, zeni...@proton.me wrote:
> Thanks for the quick response. It looks like hotplugd was what I was precisely
> looking for. As usual, my usecase was inside the manpage :).
> As a final note, I tried to do it with the resume script but it did not seem 
> to 
> work. I guess it was because the attachment takes a delay from the execution 
> of the resume script.


Suspecting the same, I put the following into etc/apm/resume


#!/bin/sh

case ${0##*/} in
        resume)
                sleep 5
                rcctl restart wpa_supplicant
                ;;
        *)
                ;;
esac

> On Monday, March 25th, 2024 at 1:38 PM, Stefan Sperling <s...@stsp.name> 
> wrote:
> 
> > On Mon, Mar 25, 2024 at 12:13:06PM +0000, ZenitDS wrote:
> > 
> > > Hello,
> > > On boot the urtwn0 interface is configured as expected, but after
> > > I sleep using 'zzz', it gets resetted and I have to manually run
> > > 'sh /etc/netstart' with root priviliges to reconfigure the interface.
> > > I tried using /etc/apm/resume, but running it there made no difference.
> > > I have seen that some people solved this issue by having a background
> > > process checking at every moment if a connection exists, and if it does
> > > not then run the sh /etc/netstart script, but it looks like a hacky.
> > > Any help will be much appreciated
> > > Thanks in advance
> > 
> > 
> > You can use the /etc/apm/resume script (see the apmd(8) manual page)
> > to run /etc/netstart urtwn0 on resume.
> > Or use hotplugd(8) to run /etc/netstart urtwn0 whenever the urtwn0 device
> > gets attached, be it during resume or when inserted into a USB port.
> 
> 

Reply via email to