[systemd-devel] Launching script that needs network before suspend
Mantas Mikulėnas
grawity at gmail.com
Mon Jan 31 12:44:42 UTC 2022
On Mon, Jan 31, 2022 at 2:01 PM Lennart Poettering <mzerqung at 0pointer.de>
wrote:
> On So, 23.01.22 22:13, Tomáš Hnyk (tomashnyk at gmail.com) wrote:
>
> > Hello,
> > I have my computer hooked up to an AVR that runs my home cinema and
> ideally
> > I would like the computer to turn off the AVR when I turn it off or
> suspend
> > it. The only way to do this is over network and I wrote a simple script
> that
> > does just that. Hooking it to shutdown was quite easy using
> network.target
> > that is defined when shutting down.
> >
> >
> > I am struggling to make it work with suspend though. When I look at the
> > logs, terminating network seems to be the first thing that happens when
> > suspend is invoked.
>
> That shouldn't happen. Normally networking shouldn't be shut down
> during suspend. If your network management solution does this
> explicitly, I am puzzled, why it would do that.
>
NetworkManager does that, especially for Wi-Fi; I don't remember the
rationale though. (It uses systemd's delay inhibitors.)
--
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20220131/2369abcf/attachment.htm>
More information about the systemd-devel
mailing list