From 8b596d51a9b347f6fe5d130cbb0d26693149ce25 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 25 Feb 2021 14:36:18 +0100 Subject: [PATCH 1/3] man: fix indentation of example The man page otherwise looks very weirdly aligned. --- man/systemd.special.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/man/systemd.special.xml b/man/systemd.special.xml index 948380b9b5..2dc61310c8 100644 --- a/man/systemd.special.xml +++ b/man/systemd.special.xml @@ -1247,18 +1247,18 @@ gnome-session.target pulls in Nautilus as top-level service: [Unit] - Description=User systemd services for GNOME graphical session - Wants=nautilus.service - BindsTo=graphical-session.target +Description=User systemd services for GNOME graphical session +Wants=nautilus.service +BindsTo=graphical-session.target nautilus.service gets stopped when the session stops: [Unit] - Description=Render the desktop icons with Nautilus - PartOf=graphical-session.target +Description=Render the desktop icons with Nautilus +PartOf=graphical-session.target - [Service] - … +[Service] +… From 26ac511a7e787e0ddac9c497c77c7067fc05ae70 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 25 Feb 2021 14:35:02 +0100 Subject: [PATCH 2/3] man: be more explicit about network-online.target and consuming services of other hosts Let's make things a tiny bit more explicit. --- man/systemd.special.xml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/man/systemd.special.xml b/man/systemd.special.xml index 2dc61310c8..3409203e4e 100644 --- a/man/systemd.special.xml +++ b/man/systemd.special.xml @@ -489,11 +489,10 @@ Services After the Network is up for more information. - All mount units for remote network file systems - automatically pull in this unit, and order themselves after - it. Note that networking daemons that simply provide - functionality to other hosts generally do not need to pull - this in. + All mount units for remote network file systems automatically pull in this unit, and order + themselves after it. Note that networking daemons that simply provide + functionality to other hosts (as opposed to consume functionality of other + hosts) generally do not need to pull this in. systemd automatically adds dependencies of type Wants= and After= for this target unit to all SysV init script service units From 85f3bd23da2421023b21d8b96e44db054ca710dc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 25 Feb 2021 14:35:47 +0100 Subject: [PATCH 3/3] man: say explicitly that network.target should give the guarantee that synthetic network interfaces have been created Prompted by: #18793 --- man/systemd.special.xml | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/man/systemd.special.xml b/man/systemd.special.xml index 3409203e4e..c9f320935d 100644 --- a/man/systemd.special.xml +++ b/man/systemd.special.xml @@ -948,20 +948,29 @@ network.target - This unit is supposed to indicate when network - functionality is available, but it is only very weakly - defined what that is supposed to mean, with one exception: - at shutdown, a unit that is ordered after - network.target will be stopped before - the network — to whatever level it might be set up then — - is shut down. It is hence useful when writing service files - that require network access on shutdown, which should order - themselves after this target, but not pull it in. Also see - Running - Services After the Network is up for more - information. Also see - network-online.target described - above. + This unit is supposed to indicate when network functionality is available, but it is only + very weakly defined what that is supposed to mean. However, the following should apply at + minimum: + + + At start-up, any configured synthetic network devices (i.e. not physical ones + that require hardware to show up and be probed, but virtual ones like bridge devices and + similar which are created programmatically) that do not depend on any underlying hardware + should be allocated by the time this target is reached. It is not necessary for these + interfaces to also have completed IP level configuration by the time + network.target is reached. + + At shutdown, a unit that is ordered after network.target + will be stopped before the network — to whatever level it might be set up by then — is shut + down. It is hence useful when writing service files that require network access on shutdown, + which should order themselves after this target, but not pull it in. Also see Running Services After + the Network is up for more information. + + + It must emphasized that at start-up there's no guarantee that hardware-based devices have + shown up by the time this target is reached, or even acquired complete IP configuration. For that + purpose use network-online.target as described above.