[systemd-devel] Passive vs Active targets

Lennart Poettering lennart at poettering.net
Tue Feb 15 17:50:20 UTC 2022


On Di, 15.02.22 09:14, Kenneth Porter (shiva at sewingwitch.com) wrote:

> Given that interfaces can come and go, does network.target imply that all
> possible interfaces are up?

No, totally and absolutely not. It's only very vaguely defined what
reaching network.target at boot actually means. Usually not more than
"some network managing daemon is running now" and nothing else. It
explicitly does not say anythign about network interfaces being up or
down or even existing.

Things are more interesting during shutdown here: because in systemd
shutdown order is the reverse of the startup order it means that stuff
ordered After=network.target will be shutdown *before* the network is
shut down, so they should still be able to send "goodbye" packets if
they want, before the network goes away.

Note that there's another target: network-online.target which is an
active target that is supposed to encapsulate the point where the
machine is actually "online". But given that this can mean a myriad of
different things (local interface up vs. ping works vs. DNS reachable,
vs. DHCP acquired, …) it's also pretty vaguely defined, and ultimately
must be filled with meaning by the admin.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list