mirror of
https://github.com/systemd/systemd.git
synced 2024-11-05 23:51:28 +03:00
681eb9cf2b
In particular, use /lib/systemd instead of /usr/lib/systemd in distributions like Debian which still have not adopted a /usr merge setup. Use XML entities from man/custom-entities.ent to replace configured paths while doing XSLT processing of the original XML files. There was precedent of some files (such as systemd.generator.xml) which were already using this approach. This addresses most of the (manual) fixes from this patch: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/patches/Fix-paths-in-man-pages.patch?h=experimental-220 The idea of using generic XML entities was presented here: http://lists.freedesktop.org/archives/systemd-devel/2015-May/032240.html This patch solves almost all the issues, with the exception of: - Path to /bin/mount and /bin/umount. - Generic statements about preference of /lib over /etc. These will be handled separately by follow up patches. Tested: - With default configure settings, ran "make install" to two separate directories and compared the output to confirm they matched exactly. - Used a set of configure flags including $CONFFLAGS from Debian: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/rules Installed the tree and confirmed the paths use /lib/systemd instead of /usr/lib/systemd and that no other unexpected differences exist. - Confirmed that `make distcheck` still passes.
175 lines
6.4 KiB
XML
175 lines
6.4 KiB
XML
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
|
||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
|
||
<!ENTITY % entities SYSTEM "custom-entities.ent" >
|
||
%entities;
|
||
]>
|
||
|
||
<!--
|
||
This file is part of systemd.
|
||
|
||
Copyright 2013 Zbigniew Jędrzejewski-Szmek
|
||
|
||
systemd is free software; you can redistribute it and/or modify it
|
||
under the terms of the GNU Lesser General Public License as published by
|
||
the Free Software Foundation; either version 2.1 of the License, or
|
||
(at your option) any later version.
|
||
|
||
systemd is distributed in the hope that it will be useful, but
|
||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
Lesser General Public License for more details.
|
||
|
||
You should have received a copy of the GNU Lesser General Public License
|
||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||
-->
|
||
|
||
<refentry id="systemd-activate"
|
||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||
|
||
<refentryinfo>
|
||
<title>systemd-activate</title>
|
||
<productname>systemd</productname>
|
||
|
||
<authorgroup>
|
||
<author>
|
||
<contrib>Developer</contrib>
|
||
<firstname>Zbigniew</firstname>
|
||
<surname>Jędrzejewski-Szmek</surname>
|
||
<email>zbyszek@in.waw.pl</email>
|
||
</author>
|
||
</authorgroup>
|
||
</refentryinfo>
|
||
|
||
<refmeta>
|
||
<refentrytitle>systemd-activate</refentrytitle>
|
||
<manvolnum>8</manvolnum>
|
||
</refmeta>
|
||
|
||
<refnamediv>
|
||
<refname>systemd-activate</refname>
|
||
<refpurpose>Test socket activation of daemons</refpurpose>
|
||
</refnamediv>
|
||
|
||
<refsynopsisdiv>
|
||
<cmdsynopsis>
|
||
<command>&rootlibexecdir;/systemd-activate</command>
|
||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||
<arg choice="plain"><replaceable>daemon</replaceable></arg>
|
||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||
</cmdsynopsis>
|
||
</refsynopsisdiv>
|
||
|
||
<refsect1>
|
||
<title>Description</title>
|
||
|
||
<para><command>systemd-activate</command> can be used to
|
||
launch a socket activated daemon from the command line for
|
||
testing purposes. It can also be used to launch single instances
|
||
of the daemon per connection (inetd-style).
|
||
</para>
|
||
|
||
<para>The daemon to launch and its options should be specified
|
||
after options intended for <command>systemd-activate</command>.
|
||
</para>
|
||
|
||
<para>If the <option>-a</option> option is given, file descriptor
|
||
of the connection will be used as the standard input and output of
|
||
the launched process. Otherwise, standard input and output will be
|
||
inherited, and sockets will be passed through file descriptors 3
|
||
and higher. Sockets passed through <varname>$LISTEN_FDS</varname>
|
||
to <command>systemd-activate</command> will be passed through to
|
||
the daemon, in the original positions. Other sockets specified
|
||
with <option>--listen</option> will use consecutive descriptors.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1>
|
||
<title>Options</title>
|
||
<variablelist>
|
||
<varlistentry>
|
||
<term><option>-l <replaceable>address</replaceable></option></term>
|
||
<term><option>--listen=<replaceable>address</replaceable></option></term>
|
||
|
||
<listitem><para>Listen on this <replaceable>address</replaceable>.
|
||
Takes a string like <literal>2000</literal> or
|
||
<literal>127.0.0.1:2001</literal>.</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
|
||
<varlistentry>
|
||
<term><option>-a</option></term>
|
||
<term><option>--accept</option></term>
|
||
|
||
<listitem><para>Launch a separate instance of daemon per
|
||
connection and pass the connection socket as standard input
|
||
and standard output.</para></listitem>
|
||
</varlistentry>
|
||
|
||
<varlistentry>
|
||
<term><option>-E <replaceable>VAR</replaceable><optional>=<replaceable>VALUE</replaceable></optional></option></term>
|
||
<term><option>--setenv=<replaceable>VAR</replaceable><optional>=<replaceable>VALUE</replaceable></optional></option></term>
|
||
|
||
<listitem><para>Add this variable to the environment of the
|
||
launched process. If <replaceable>VAR</replaceable> is
|
||
followed by <literal>=</literal>, assume that it is a
|
||
variable–value pair. Otherwise, obtain the value from the
|
||
environment of <command>systemd-activate</command> itself.
|
||
</para></listitem>
|
||
</varlistentry>
|
||
|
||
<xi:include href="standard-options.xml" xpointer="help" />
|
||
<xi:include href="standard-options.xml" xpointer="version" />
|
||
</variablelist>
|
||
</refsect1>
|
||
|
||
<refsect1>
|
||
<title>Environment variables</title>
|
||
<variablelist class='environment-variables'>
|
||
<varlistentry>
|
||
<term><varname>$LISTEN_FDS</varname></term>
|
||
<term><varname>$LISTEN_PID</varname></term>
|
||
|
||
<listitem><para>See
|
||
<citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
|
||
</varlistentry>
|
||
|
||
<varlistentry>
|
||
<term><varname>$SYSTEMD_LOG_TARGET</varname></term>
|
||
<term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
|
||
<term><varname>$SYSTEMD_LOG_COLOR</varname></term>
|
||
<term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
|
||
|
||
<listitem><para>Same as in
|
||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para></listitem>
|
||
</varlistentry>
|
||
</variablelist>
|
||
</refsect1>
|
||
|
||
<refsect1>
|
||
<title>Examples</title>
|
||
|
||
<example>
|
||
<title>Run an echo server on port 2000</title>
|
||
|
||
<programlisting>$ &rootlibexecdir;/systemd-activate -l 2000 -a cat</programlisting>
|
||
</example>
|
||
|
||
<example>
|
||
<title>Run a socket activated instance of <citerefentry><refentrytitle>systemd-journal-gatewayd</refentrytitle><manvolnum>8</manvolnum></citerefentry></title>
|
||
|
||
<programlisting>$ &rootlibexecdir;/systemd-activate -l 19531 &rootlibexecdir;/systemd-journal-gatewayd</programlisting>
|
||
</example>
|
||
</refsect1>
|
||
|
||
<refsect1>
|
||
<title>See Also</title>
|
||
<para>
|
||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||
<citerefentry project='man-pages'><refentrytitle>cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||
</para>
|
||
</refsect1>
|
||
</refentry>
|