Skip to content

Commit 2218198

Browse files
committed
man: start documenting systemd itself
1 parent a838e6a commit 2218198

File tree

4 files changed

+225
-15
lines changed

4 files changed

+225
-15
lines changed

man/runlevel.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,16 @@
6767
<para>Unless overriden in the environment this will
6868
check the utmp database for recent runlevel
6969
changes.</para>
70+
</refsect1>
71+
72+
<refsect1>
73+
<title>Options</title>
7074

7175
<para>The following option is understood:</para>
7276

7377
<variablelist>
7478
<varlistentry>
75-
<term>--help</term>
79+
<term><option>--help</option></term>
7680

7781
<listitem><para>Prints a short help
7882
text and exits.</para></listitem>

man/systemd-install.xml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
along with systemd; If not, see <http://www.gnu.org/licenses/>.
2222
-->
2323

24-
<refentry id="systemd">
24+
<refentry id="systemd-install">
2525

2626
<refentryinfo>
2727
<title>systemd-install</title>
@@ -50,13 +50,13 @@
5050

5151
<refsynopsisdiv>
5252
<cmdsynopsis>
53-
<command>systemd-install <arg choice="opt" rep="repeat">options</arg> <option>enable</option> <arg choice="opt" rep="repeat">name</arg></command>
53+
<command>systemd-install <arg choice="opt" rep="repeat">options</arg> <arg choice="plain">enable</arg> <arg choice="opt" rep="repeat">name</arg></command>
5454
</cmdsynopsis>
5555
<cmdsynopsis>
56-
<command>systemd-install <arg choice="opt" rep="repeat">options</arg> <option>disable</option> <arg choice="opt" rep="repeat">name</arg></command>
56+
<command>systemd-install <arg choice="opt" rep="repeat">options</arg> <arg choice="plain">disable</arg> <arg choice="opt" rep="repeat">name</arg></command>
5757
</cmdsynopsis>
5858
<cmdsynopsis>
59-
<command>systemd-install <arg choice="opt" rep="repeat">options</arg> <option>test</option> <arg choice="opt" rep="repeat">name</arg></command>
59+
<command>systemd-install <arg choice="opt" rep="repeat">options</arg> <arg choice="plain">test</arg> <arg choice="opt" rep="repeat">name</arg></command>
6060
</cmdsynopsis>
6161
</refsynopsisdiv>
6262

@@ -66,19 +66,23 @@
6666
<para><command>systemd-install</command> enables or
6767
disables systemd units, or checks whether they are
6868
enabled.</para>
69+
</refsect1>
70+
71+
<refsect1>
72+
<title>Options</title>
6973

7074
<para>The following options are understood:</para>
7175

7276
<variablelist>
7377
<varlistentry>
74-
<term>--help</term>
78+
<term><option>--help</option></term>
7579

7680
<listitem><para>Prints a short help
7781
text and exits.</para></listitem>
7882
</varlistentry>
7983

8084
<varlistentry>
81-
<term>--force</term>
85+
<term><option>--force</option></term>
8286

8387
<listitem><para>Enable/disable a
8488
service even if it conflicts
@@ -89,22 +93,22 @@
8993
</varlistentry>
9094

9195
<varlistentry>
92-
<term>--system</term>
96+
<term><option>--system</option></term>
9397

9498
<listitem><para>Enable/disable a
9599
system service.</para></listitem>
96100
</varlistentry>
97101

98102
<varlistentry>
99-
<term>--session</term>
103+
<term><option>--session</option></term>
100104

101105
<listitem><para>Enable/disable a
102106
session service for the calling
103107
user.</para></listitem>
104108
</varlistentry>
105109

106110
<varlistentry>
107-
<term>--global</term>
111+
<term><option>--global</option></term>
108112

109113
<listitem><para>Enable/disable a
110114
session service for all
@@ -116,7 +120,7 @@
116120

117121
<variablelist>
118122
<varlistentry>
119-
<term>enable</term>
123+
<term><command>enable</command></term>
120124

121125
<listitem><para>Enable a unit. This
122126
will create a number of symlinks as
@@ -125,7 +129,7 @@
125129
</varlistentry>
126130

127131
<varlistentry>
128-
<term>disable</term>
132+
<term><command>disable</command></term>
129133

130134
<listitem><para>Disable a unit. This
131135
will removed a number of symlinks as
@@ -134,7 +138,7 @@
134138
</varlistentry>
135139

136140
<varlistentry>
137-
<term>test</term>
141+
<term><command>test</command></term>
138142

139143
<listitem><para>Checks whether any of
140144
the units specified are

man/systemd.xml

Lines changed: 203 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,212 @@
4747
<refpurpose>systemd System and Session Manager</refpurpose>
4848
</refnamediv>
4949

50+
<refsynopsisdiv>
51+
<cmdsynopsis>
52+
<command>systemd <arg choice="opt" rep="repeat">options</arg></command>
53+
</cmdsynopsis>
54+
<cmdsynopsis>
55+
<command>init <arg choice="opt" rep="repeat">options</arg></command>
56+
</cmdsynopsis>
57+
</refsynopsisdiv>
58+
5059
<refsect1>
5160
<title>Description</title>
5261

53-
<para>Systemd is awesome.</para>
62+
<para>systemd is a system and session manager for
63+
Linux operating systems. When run as first process on
64+
boot (as PID 1) it may act as init system that brings
65+
up and maintains userspace.</para>
66+
67+
<para>For compatibility with SysV if systemd is called
68+
as <command>init</command> and a PID that is not
69+
1 it will execute <command>telinit</command> and pass
70+
all command line arguments unmodified. That means
71+
<command>init</command> and <command>telinit</command>
72+
are mostly equivalent when invoked from normal login sessions. See
73+
<citerefentry><refentrytitle>telinit</refentrytitle><manvolnum>8</manvolnum></citerefentry>
74+
for more information.</para>
75+
</refsect1>
76+
77+
<refsect1>
78+
<title>Options</title>
79+
80+
<para>The following options are understood:</para>
81+
82+
<variablelist>
83+
<varlistentry>
84+
<term><option>-h</option> | <option>--help</option></term>
85+
86+
<listitem><para>Prints a short help
87+
text and exits.</para></listitem>
88+
</varlistentry>
89+
<varlistentry>
90+
<term><option>--unit=</option></term>
91+
92+
<listitem><para>Set default unit to
93+
activate on startup. If not specified
94+
defaults to
95+
<filename>default.target</filename>.</para></listitem>
96+
</varlistentry>
97+
<varlistentry>
98+
<term><option>--running-as=</option></term>
99+
100+
<listitem><para>Tell systemd to run in
101+
a particular mode. Argument is one of
102+
<option>system</option>,
103+
<option>session</option>. Normally it
104+
should not be necessary to pass this
105+
option, as systemd automatically
106+
detects the mode it is started
107+
in. This call is hence of little use
108+
except for
109+
debugging.</para></listitem>
110+
</varlistentry>
111+
<varlistentry>
112+
<term><option>--test</option></term>
113+
114+
<listitem><para>Determine startup
115+
sequence, dump it and exit. This is an
116+
option useful for debugging
117+
only.</para></listitem>
118+
</varlistentry>
119+
<varlistentry>
120+
<term><option>--dump-configuration-items</option></term>
121+
122+
<listitem><para>Dump understood unit
123+
configuration items. This outputs a
124+
terse list of configuration items
125+
understood in unit definition
126+
files.</para></listitem>
127+
</varlistentry>
128+
<varlistentry>
129+
<term><option>--confirm-spawn</option></term>
130+
131+
<listitem><para>Ask for confirmation when spawning processes.</para></listitem>
132+
</varlistentry>
133+
<varlistentry>
134+
<term><option>--introspect=</option></term>
135+
136+
<listitem><para>Extract D-Bus
137+
interface introspection data. This is
138+
mostly useful at build ot install time
139+
to generate data suitable for the
140+
D-Bus interfaces
141+
repository. Optionally the interface
142+
name for the introspection data may be
143+
specified. If omitted the
144+
introspection data for all interfaces
145+
is dumped.</para></listitem>
146+
</varlistentry>
147+
<varlistentry>
148+
<term><option>--log-level=</option></term>
149+
150+
<listitem><para>Set log level. As
151+
argument this accepts a numerical log
152+
level or the well-known <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
153+
symbolic names (lowercase):
154+
<option>emerg</option>,
155+
<option>alert</option>,
156+
<option>crit</option>,
157+
<option>err</option>,
158+
<option>warning</option>,
159+
<option>notice</option>,
160+
<option>info</option>,
161+
<option>debug</option>.</para></listitem>
162+
</varlistentry>
163+
<varlistentry>
164+
<term><option>--log-target=</option></term>
165+
166+
<listitem><para>Set log
167+
target. Argument must be one of
168+
<option>console</option>,
169+
<option>syslog</option>,
170+
<option>kmsg</option>,
171+
<option>syslog-or-kmsg</option>,
172+
<option>null</option>.</para></listitem>
173+
</varlistentry>
174+
<varlistentry>
175+
<term><option>--log-color=</option></term>
176+
177+
<listitem><para>Highlight important
178+
log messages. Argument is a boolean
179+
value. If the argument is omitted it
180+
defaults to
181+
<option>true</option>.</para></listitem>
182+
</varlistentry>
183+
<varlistentry>
184+
<term><option>--log-location=</option></term>
185+
186+
<listitem><para>Include code location
187+
in log messages. This is mostly
188+
relevant for debugging
189+
purposes. Argument is a boolean
190+
value. If the argument is omitted
191+
it defaults to
192+
<option>true</option>.</para></listitem>
193+
</varlistentry>
194+
195+
196+
</variablelist>
197+
</refsect1>
198+
199+
<refsect1>
200+
<title>Sockets and FIFOs</title>
201+
202+
<variablelist>
203+
<varlistentry>
204+
<term><filename>@/org/freedesktop/systemd1/notify</filename></term>
205+
206+
<listitem><para>Daemon status
207+
notification socket. This is an AF_UNIX
208+
datagram socket in the Linux abstract
209+
namespace, and is used to implement
210+
the daemon notification logic as
211+
implemented by
212+
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
213+
214+
</varlistentry>
215+
216+
<varlistentry>
217+
<term><filename>@/org/freedesktop/systemd1/logger</filename></term>
218+
219+
<listitem><para>Used internally by the
220+
<filename>systemd-logger.service</filename>
221+
unit to connect STDOUT and/or STDERR
222+
of spawned processes to
223+
<citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
224+
or the kernel log buffer. This is an
225+
AF_UNIX stream socket in the Linux
226+
abstract namespace.</para></listitem>
227+
</varlistentry>
228+
229+
<varlistentry>
230+
<term><filename>@/org/freedesktop/systemd1/private</filename></term>
231+
232+
<listitem><para>Used internally as
233+
communication channel between
234+
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
235+
and the systemd process. This is an
236+
AF_UNIX stream socket in the Linux
237+
abstract namespace. This interface is
238+
private to systemd and should not be
239+
used in external
240+
projects.</para></listitem>
241+
</varlistentry>
242+
243+
<varlistentry>
244+
<term><filename>/dev/initctl</filename></term>
245+
246+
<listitem><para>Limited compatibility
247+
support for the SysV client interface,
248+
as implemented by the
249+
<filename>systemd-initctl.service</filename>
250+
unit. This is a named pipe in the file
251+
system. This interface is obsolete and
252+
should not be used in new
253+
applications.</para></listitem>
254+
</varlistentry>
255+
</variablelist>
54256
</refsect1>
55257

56258

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ static int help(void) {
547547
" --introspect[=INTERFACE] Extract D-Bus interface data\n"
548548
" --log-level=LEVEL Set log level\n"
549549
" --log-target=TARGET Set log target (console, syslog, kmsg, syslog-or-kmsg, null)\n"
550-
" --log-color[=0|1] Highlight import log messages\n"
550+
" --log-color[=0|1] Highlight important log messages\n"
551551
" --log-location[=0|1] Include code location in log messages\n",
552552
program_invocation_short_name);
553553

0 commit comments

Comments
 (0)