teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame 0212-man-expand-on-some-more-subtle-points-in-systemd.soc.patch

Zbigniew Jędrzejewski-Szmek 126222
From 204a710b647527c35cee26962bbd324e6cebc822 Mon Sep 17 00:00:00 2001
Zbigniew Jędrzejewski-Szmek 126222
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Zbigniew Jędrzejewski-Szmek 126222
Date: Mon, 30 Dec 2013 00:11:30 -0500
Zbigniew Jędrzejewski-Szmek 126222
Subject: [PATCH] man: expand on some more subtle points in systemd.socket(5)
Zbigniew Jędrzejewski-Szmek 126222
Zbigniew Jędrzejewski-Szmek 126222
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727708#1694
Zbigniew Jędrzejewski-Szmek 126222
---
Zbigniew Jędrzejewski-Szmek 126222
 man/systemd.socket.xml | 67 ++++++++++++++++++++++++++++++++++++--------------
Zbigniew Jędrzejewski-Szmek 126222
 1 file changed, 49 insertions(+), 18 deletions(-)
Zbigniew Jędrzejewski-Szmek 126222
Zbigniew Jędrzejewski-Szmek 126222
diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
Zbigniew Jędrzejewski-Szmek 126222
index ac3127d..570a6fb 100644
Zbigniew Jędrzejewski-Szmek 126222
--- a/man/systemd.socket.xml
Zbigniew Jędrzejewski-Szmek 126222
+++ b/man/systemd.socket.xml
Zbigniew Jędrzejewski-Szmek 126222
@@ -85,21 +85,26 @@
Zbigniew Jędrzejewski-Szmek 126222
                 processes of the socket.</para>
Zbigniew Jędrzejewski-Szmek 126222
 
Zbigniew Jędrzejewski-Szmek 126222
                 <para>For each socket file a matching service file
Zbigniew Jędrzejewski-Szmek 126222
-                (see
Zbigniew Jędrzejewski-Szmek 126222
+                must exist, describing the service to start on
Zbigniew Jędrzejewski-Szmek 126222
+                incoming traffic on the socket (see
Zbigniew Jędrzejewski-Szmek 126222
                 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
Zbigniew Jędrzejewski-Szmek 126222
-                for details) must exist, describing the service to
Zbigniew Jędrzejewski-Szmek 126222
-                start on incoming traffic on the socket. Depending on
Zbigniew Jędrzejewski-Szmek 126222
-                the setting of <option>Accept=</option> (see below),
Zbigniew Jędrzejewski-Szmek 126222
-                this must either be named like the socket unit, but
Zbigniew Jędrzejewski-Szmek 126222
-                with the suffix replaced; or it must be a template
Zbigniew Jędrzejewski-Szmek 126222
-                file named the same way. Example: a socket file
Zbigniew Jędrzejewski-Szmek 126222
+                for more information about .service files). The name
Zbigniew Jędrzejewski-Szmek 126222
+                of the .service unit is by default the same as the
Zbigniew Jędrzejewski-Szmek 126222
+                name of the .socket unit, but can be altered with
Zbigniew Jędrzejewski-Szmek 126222
+                <option>Service=</option> option described below.
Zbigniew Jędrzejewski-Szmek 126222
+                Depending on the setting of <option>Accept=</option>
Zbigniew Jędrzejewski-Szmek 126222
+                option described below, this .service unit must either
Zbigniew Jędrzejewski-Szmek 126222
+                be named like the .socket unit, but with the suffix
Zbigniew Jędrzejewski-Szmek 126222
+                replaced, unless overridden with
Zbigniew Jędrzejewski-Szmek 126222
+                <option>Service=</option>; or it must be a template
Zbigniew Jędrzejewski-Szmek 126222
+                unit named the same way. Example: a socket file
Zbigniew Jędrzejewski-Szmek 126222
                 <filename>foo.socket</filename> needs a matching
Zbigniew Jędrzejewski-Szmek 126222
                 service <filename>foo.service</filename> if
Zbigniew Jędrzejewski-Szmek 126222
                 <option>Accept=false</option> is set. If
Zbigniew Jędrzejewski-Szmek 126222
-                <option>Accept=true</option> is set, a service template
Zbigniew Jędrzejewski-Szmek 126222
-                file <filename>foo@.service</filename> must exist from
Zbigniew Jędrzejewski-Szmek 126222
-                which services are instantiated for each incoming
Zbigniew Jędrzejewski-Szmek 126222
-                connection.</para>
Zbigniew Jędrzejewski-Szmek 126222
+                <option>Accept=true</option> is set, a service
Zbigniew Jędrzejewski-Szmek 126222
+                template file <filename>foo@.service</filename> must
Zbigniew Jędrzejewski-Szmek 126222
+                exist from which services are instantiated for each
Zbigniew Jędrzejewski-Szmek 126222
+                incoming connection.</para>
Zbigniew Jędrzejewski-Szmek 126222
 
Zbigniew Jędrzejewski-Szmek 126222
                 <para>Unless <varname>DefaultDependencies=</varname>
Zbigniew Jędrzejewski-Szmek 126222
                 is set to <option>false</option>, socket units will
Zbigniew Jędrzejewski-Szmek 126222
@@ -116,9 +121,21 @@
Zbigniew Jędrzejewski-Szmek 126222
                 boot or late system shutdown should disable this
Zbigniew Jędrzejewski-Szmek 126222
                 option.</para>
Zbigniew Jędrzejewski-Szmek 126222
 
Zbigniew Jędrzejewski-Szmek 126222
+		<para>Socket units will have a
Zbigniew Jędrzejewski-Szmek 126222
+		<varname>Before=</varname> dependency on the service
Zbigniew Jędrzejewski-Szmek 126222
+		which they trigger added implicitly. No implicit
Zbigniew Jędrzejewski-Szmek 126222
+		<varname>WantedBy=</varname> or
Zbigniew Jędrzejewski-Szmek 126222
+		<varname>RequiredBy=</varname> dependency from the
Zbigniew Jędrzejewski-Szmek 126222
+		socket to the service is added. This means that the
Zbigniew Jędrzejewski-Szmek 126222
+		service may be started without the socket, in which
Zbigniew Jędrzejewski-Szmek 126222
+		case it must be able to open sockets by itself. To
Zbigniew Jędrzejewski-Szmek 126222
+		prevent this, an explicit <varname>Requires=</varname>
Zbigniew Jędrzejewski-Szmek 126222
+		dependency may be added.</para>
Zbigniew Jędrzejewski-Szmek 126222
+
Zbigniew Jędrzejewski-Szmek 126222
                 <para>Socket units may be used to implement on-demand
Zbigniew Jędrzejewski-Szmek 126222
                 starting of services, as well as parallelized starting
Zbigniew Jędrzejewski-Szmek 126222
-                of services.</para>
Zbigniew Jędrzejewski-Szmek 126222
+                of services. See the blog stories linked at the end
Zbigniew Jędrzejewski-Szmek 126222
+                for introduction.</para>
Zbigniew Jędrzejewski-Szmek 126222
 
Zbigniew Jędrzejewski-Szmek 126222
                 <para>Note that the daemon software configured for
Zbigniew Jędrzejewski-Szmek 126222
                 socket activation with socket units needs to be able
Zbigniew Jędrzejewski-Szmek 126222
@@ -221,12 +238,23 @@
Zbigniew Jędrzejewski-Szmek 126222
                                 of any of these options will have no
Zbigniew Jędrzejewski-Szmek 126222
                                 effect.</para>
Zbigniew Jędrzejewski-Szmek 126222
 
Zbigniew Jędrzejewski-Szmek 126222
+                                <para>It is also possible to have more
Zbigniew Jędrzejewski-Szmek 126222
+                                than one socket unit for the same
Zbigniew Jędrzejewski-Szmek 126222
+                                service when using
Zbigniew Jędrzejewski-Szmek 126222
+                                <varname>Service=</varname>, and the
Zbigniew Jędrzejewski-Szmek 126222
+                                service will receive all the sockets
Zbigniew Jędrzejewski-Szmek 126222
+                                configured in all the socket units.
Zbigniew Jędrzejewski-Szmek 126222
+                                Sockets configured in one unit are
Zbigniew Jędrzejewski-Szmek 126222
+                                passed in the order of configuration,
Zbigniew Jędrzejewski-Szmek 126222
+                                but no ordering between socket units
Zbigniew Jędrzejewski-Szmek 126222
+                                is specified.</para>
Zbigniew Jędrzejewski-Szmek 126222
+
Zbigniew Jędrzejewski-Szmek 126222
                                 <para>If an IP address is used here,
Zbigniew Jędrzejewski-Szmek 126222
                                 it is often desirable to listen on it
Zbigniew Jędrzejewski-Szmek 126222
                                 before the interface it is configured
Zbigniew Jędrzejewski-Szmek 126222
                                 on is up and running, and even
Zbigniew Jędrzejewski-Szmek 126222
                                 regardless of whether it will be up and
Zbigniew Jędrzejewski-Szmek 126222
-                                running ever at all. To deal with this
Zbigniew Jędrzejewski-Szmek 126222
+                                running at any point. To deal with this
Zbigniew Jędrzejewski-Szmek 126222
                                 it is recommended to set the
Zbigniew Jędrzejewski-Szmek 126222
                                 <varname>FreeBind=</varname> option
Zbigniew Jędrzejewski-Szmek 126222
                                 described below.</para></listitem>
Zbigniew Jędrzejewski-Szmek 126222
@@ -687,11 +715,14 @@
Zbigniew Jędrzejewski-Szmek 126222
                                 <term><varname>Service=</varname></term>
Zbigniew Jędrzejewski-Szmek 126222
                                 <listitem><para>Specifies the service
Zbigniew Jędrzejewski-Szmek 126222
                                 unit name to activate on incoming
Zbigniew Jędrzejewski-Szmek 126222
-                                traffic. This defaults to the service
Zbigniew Jędrzejewski-Szmek 126222
-                                that bears the same name as the socket
Zbigniew Jędrzejewski-Szmek 126222
-                                (ignoring the different suffixes). In
Zbigniew Jędrzejewski-Szmek 126222
-                                most cases it should not be necessary
Zbigniew Jędrzejewski-Szmek 126222
-                                to use this option.</para></listitem>
Zbigniew Jędrzejewski-Szmek 126222
+                                traffic. This setting is only allowed
Zbigniew Jędrzejewski-Szmek 126222
+                                for sockets with
Zbigniew Jędrzejewski-Szmek 126222
+                                <varname>Accept=no</varname>. It
Zbigniew Jędrzejewski-Szmek 126222
+                                defaults to the service that bears the
Zbigniew Jędrzejewski-Szmek 126222
+                                same name as the socket (with the
Zbigniew Jędrzejewski-Szmek 126222
+                                suffix replaced). In most cases it
Zbigniew Jędrzejewski-Szmek 126222
+                                should not be necessary to use this
Zbigniew Jędrzejewski-Szmek 126222
+                                option.</para></listitem>
Zbigniew Jędrzejewski-Szmek 126222
                         </varlistentry>
Zbigniew Jędrzejewski-Szmek 126222
 
Zbigniew Jędrzejewski-Szmek 126222
                 </variablelist>