From 45f09f939b50387d65ab6fc46f47608523a6ef19 Mon Sep 17 00:00:00 2001 From: John Lin Date: Tue, 12 Sep 2017 12:02:27 +0800 Subject: man: explicitly distinguish "implicit dependencies" and "default dependencies" Fixes: #6793 --- man/systemd.socket.xml | 79 +++++++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 36 deletions(-) (limited to 'man/systemd.socket.xml') diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml index 1d20a8f7f7..5bec53ac1e 100644 --- a/man/systemd.socket.xml +++ b/man/systemd.socket.xml @@ -97,16 +97,7 @@ foo@.service must exist from which services are instantiated for each incoming connection. - Unless DefaultDependencies= in the [Unit] section is set to - , socket units will implicitly have dependencies of type Requires= and - After= on sysinit.target as well as dependencies of type - Conflicts= and Before= on shutdown.target. These ensure - that socket units pull in basic system initialization, and are terminated cleanly prior to system shutdown. Only - sockets involved with early boot or late system shutdown should disable this option. - - Socket units will have a Before= - dependency on the service which they trigger added implicitly. No - implicit WantedBy= or + No implicit WantedBy= or RequiredBy= dependency from the socket to the service is added. This means that the service may be started without the socket, in which case it must be able to open sockets @@ -130,31 +121,24 @@ - Automatic Dependencies - - Socket units automatically gain a Before= - dependency on the service units they activate. - - Socket units referring to file system paths (such as AF_UNIX - sockets or FIFOs) implicitly gain Requires= and - After= dependencies on all mount units - necessary to access those paths. - - Socket units using the BindToDevice= - setting automatically gain a BindsTo= and - After= dependency on the device unit - encapsulating the specified network interface. - - If DefaultDependencies=yes is set (the - default), socket units automatically gain a - Before= dependency on - sockets.target. They also gain a pair of - After= and Requires= - dependency on sysinit.target, and a pair of - Before= and Conflicts= - dependencies on shutdown.target. These - dependencies ensure that the socket unit is started before normal - services at boot, and is stopped on shutdown. + Implicit Dependencies + + The following dependencies are implicitly added: + + + Socket units automatically gain a Before= + dependency on the service units they activate. + + Socket units referring to file system paths (such as AF_UNIX + sockets or FIFOs) implicitly gain Requires= and + After= dependencies on all mount units + necessary to access those paths. + + Socket units using the BindToDevice= + setting automatically gain a BindsTo= and + After= dependency on the device unit + encapsulating the specified network interface. + Additional implicit dependencies may be added as result of execution and resource control parameters as documented in @@ -163,6 +147,29 @@ systemd.resource-control5. + + Default Dependencies + + The following dependencies are added unless + DefaultDependencies=no is set: + + + Socket units automatically gain a + Before= dependency on + sockets.target. + + Socket units automatically gain a pair of + After= and Requires= + dependency on sysinit.target, and a pair of + Before= and Conflicts= + dependencies on shutdown.target. These + dependencies ensure that the socket unit is started before normal + services at boot, and is stopped on shutdown. Only sockets + involved with early boot or late system shutdown should disable + DefaultDependencies= option. + + + Options @@ -358,7 +365,7 @@ specified network interfaces. This controls the SO_BINDTODEVICE socket option (see socket7 - for details). If this option is used, an automatic dependency + for details). If this option is used, an implicit dependency from this socket unit on the network interface device unit (systemd.device5 is created. Note that setting this parameter might result in -- cgit v1.2.1