1
0
mirror of https://github.com/systemd/systemd synced 2025-10-03 10:44:44 +02:00

Compare commits

..

No commits in common. "cd18afec16bf179205a1d4fb371af8546d3e14f3" and "57733518817c1217b9f442ca790ff3f50705b1c8" have entirely different histories.

37 changed files with 385 additions and 792 deletions

2
NEWS
View File

@ -10490,7 +10490,7 @@ CHANGES WITH 201:
* 'systemctl status' will also shown information about any * 'systemctl status' will also shown information about any
drop-in configuration file for units. (Drop-In configuration drop-in configuration file for units. (Drop-In configuration
files in this context are files such as files in this context are files such as
/etc/systemd/system/foobar.service.d/*.conf) /etc/systemd/systemd/foobar.service.d/*.conf)
* systemd-cgtop now optionally shows summed up CPU times of * systemd-cgtop now optionally shows summed up CPU times of
cgroups. Press '%' while running cgtop to switch between cgroups. Press '%' while running cgtop to switch between

1
TODO
View File

@ -1272,7 +1272,6 @@ Features:
- creating new directories/subvolumes/fifos/device nodes - creating new directories/subvolumes/fifos/device nodes
should not follow symlinks. None of the other adjustment or creation should not follow symlinks. None of the other adjustment or creation
calls follow symlinks. calls follow symlinks.
- add --test mode
* make sure systemd-ask-password-wall does not shutdown systemd-ask-password-console too early * make sure systemd-ask-password-wall does not shutdown systemd-ask-password-console too early

View File

@ -324,47 +324,35 @@
<title>Examples</title> <title>Examples</title>
<example> <example>
<title>List all the core dumps of a program</title> <title>List all the core dumps of a program named foo</title>
<programlisting>$ coredumpctl list /usr/lib64/firefox/firefox <programlisting># coredumpctl list foo</programlisting>
TIME PID UID GID SIG COREFILE EXE SIZE
Tue … 8018 1000 1000 SIGSEGV missing /usr/lib64/firefox/firefox n/a
Wed … 251609 1000 1000 SIGTRAP missing /usr/lib64/firefox/firefox n/a
Fri … 552351 1000 1000 SIGSEGV present /usr/lib64/firefox/firefox 28.7M
</programlisting>
<para>The journal has three entries pertaining to <filename>/usr/lib64/firefox/firefox</filename>, and
only the last entry still has an available core file (in external storage on disk).</para>
<para>Note that <filename>coredumpctl</filename> needs access to the journal files to retrieve the
relevant entries from the journal. Thus, an unprivileged user will normally only see information about
crashing programs of this user.</para>
</example> </example>
<example> <example>
<title>Invoke <command>gdb</command> on the last core dump</title> <title>Invoke gdb on the last core dump</title>
<programlisting>$ coredumpctl debug</programlisting> <programlisting># coredumpctl debug</programlisting>
</example> </example>
<example> <example>
<title>Use <command>gdb</command> to display full register info from the last core dump</title> <title>Use gdb to display full register info from the last core dump</title>
<programlisting>$ coredumpctl debug --debugger-arguments="-batch -ex 'info all-registers'"</programlisting> <programlisting># coredumpctl debug --debugger-arguments="-batch -ex 'info all-registers'"</programlisting>
</example> </example>
<example> <example>
<title>Show information about a process that dumped core, <title>Show information about a process that dumped core,
matching by its PID 6654</title> matching by its PID 6654</title>
<programlisting>$ coredumpctl info 6654</programlisting> <programlisting># coredumpctl info 6654</programlisting>
</example> </example>
<example> <example>
<title>Extract the last core dump of /usr/bin/bar to a file named <title>Extract the last core dump of /usr/bin/bar to a file named
<filename index="false">bar.coredump</filename></title> <filename index="false">bar.coredump</filename></title>
<programlisting>$ coredumpctl -o bar.coredump dump /usr/bin/bar</programlisting> <programlisting># coredumpctl -o bar.coredump dump /usr/bin/bar</programlisting>
</example> </example>
</refsect1> </refsect1>

View File

@ -848,7 +848,7 @@
<para>On success, 0 is returned, a non-zero failure code otherwise.</para> <para>On success, 0 is returned, a non-zero failure code otherwise.</para>
</refsect1> </refsect1>
<xi:include href="common-variables.xml" /> <xi:include href="less-variables.xml" />
<refsect1> <refsect1>
<title>Examples</title> <title>Examples</title>

View File

@ -992,7 +992,7 @@
code is returned.</para> code is returned.</para>
</refsect1> </refsect1>
<xi:include href="common-variables.xml" /> <xi:include href="less-variables.xml" />
<refsect1> <refsect1>
<title>Examples</title> <title>Examples</title>

View File

@ -7,80 +7,6 @@
<title>Environment</title> <title>Environment</title>
<variablelist class='environment-variables'> <variablelist class='environment-variables'>
<varlistentry id='log-level'>
<term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
<listitem><para id='log-level-body'>The maximum log level of emitted messages (messages with a higher
log level, i.e. less important ones, will be suppressed). Either one of (in order of decreasing
importance) <constant>emerg</constant>, <constant>alert</constant>, <constant>crit</constant>,
<constant>err</constant>, <constant>warning</constant>, <constant>notice</constant>,
<constant>info</constant>, <constant>debug</constant>, or an integer in the range 0…7. See
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
for more information.</para>
</listitem>
</varlistentry>
<varlistentry id='log-color'>
<term><varname>$SYSTEMD_LOG_COLOR</varname></term>
<listitem><para id='log-color-body'>A boolean. If true, messages written to the tty will be colored
according to priority.</para>
<para>This setting is only useful when messages are written directly to the terminal, because
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> and
other tools that display logs will color messages based on the log level on their own.</para>
</listitem>
</varlistentry>
<varlistentry id='log-time'>
<term><varname>$SYSTEMD_LOG_TIME</varname></term>
<listitem><para id='log-time-body'>A boolean. If true, log messages will be prefixed with a
timestamp.</para>
<para>This setting is only useful when messages are written directly to the terminal or a file, because
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> and
other tools that display logs will attach timestamps based on the entry metadata on their own.</para>
</listitem>
</varlistentry>
<varlistentry id='log-location'>
<term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
<listitem><para id='log-location-body'>A boolean. If true, messages will be prefixed with a filename
and line number in the source code where the message originates.</para>
<para>Note that the log location is often attached as metadata to journal entries anyway. Including it
directly in the message text can nevertheless be convenient when debugging programs.</para>
</listitem>
</varlistentry>
<varlistentry id='log-tid'>
<term><varname>$SYSTEMD_LOG_TID</varname></term>
<listitem><para id='log-tid-body'>A boolean. If true, messages will be prefixed with the current
numerical thread ID (TID).</para>
<para>Note that the this information is attached as metadata to journal entries anyway. Including it
directly in the message text can nevertheless be convenient when debugging programs.</para>
</listitem>
</varlistentry>
<varlistentry id='log-target'>
<term><varname>$SYSTEMD_LOG_TARGET</varname></term>
<listitem><para id='log-target-body'>The destination for log messages. One of
<constant>console</constant> (log to the attached tty), <constant>console-prefixed</constant> (log to
the attached tty but with prefixes encoding the log level and "facility", see <citerefentry
project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<constant>kmsg</constant> (log to the kernel circular log buffer), <constant>journal</constant> (log to
the journal), <constant>journal-or-kmsg</constant> (log to the journal if available, and to kmsg
otherwise), <constant>auto</constant> (dermine the appropriate log target automatically, the default),
<constant>null</constant> (disable log output).</para>
<!-- <constant>syslog</constant>, <constant>syslog-or-kmsg</constant> are deprecated -->
</listitem>
</varlistentry>
<varlistentry id='pager'> <varlistentry id='pager'>
<term><varname>$SYSTEMD_PAGER</varname></term> <term><varname>$SYSTEMD_PAGER</varname></term>

View File

@ -185,7 +185,7 @@
otherwise.</para> otherwise.</para>
</refsect1> </refsect1>
<xi:include href="common-variables.xml" /> <xi:include href="less-variables.xml" />
<refsect1> <refsect1>
<title>See Also</title> <title>See Also</title>

View File

@ -415,7 +415,7 @@ Apr 09 14:40:30 laptop login[2325]: LOGIN ON tty3 BY fatima
</example> </example>
</refsect1> </refsect1>
<xi:include href="common-variables.xml" /> <xi:include href="less-variables.xml" />
<refsect1> <refsect1>
<title>See Also</title> <title>See Also</title>

View File

@ -37,10 +37,12 @@
file without implementing a shell compatible execution file without implementing a shell compatible execution
engine.</para> engine.</para>
<para><filename>/etc/machine-info</filename> contains metadata about the machine that is set by the user <para><filename>/etc/machine-info</filename> contains metadata
or administrator. The settings configured here have the highest precedence. When not set, appropriate about the machine that is set by the user or administrator.</para>
values may be determined automatically, based on the information about the hardware or other
configuration files. It is thus completely fine for this file to not be present.</para> <para>Depending on the operating system other configuration files
might be checked for machine information as well, however only as
fallback.</para>
<para>You may use <para>You may use
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
@ -100,11 +102,13 @@
as well as the special chassis types as well as the special chassis types
<literal>vm</literal> and <literal>vm</literal> and
<literal>container</literal> for <literal>container</literal> for
virtualized systems that lack an immediate physical chassis.</para> virtualized systems that lack an immediate physical chassis.
Note that many systems allow detection of the chassis type
<para>Note that most systems allow detection of the chassis type automatically (based on firmware automatically (based on firmware information or suchlike).
information or suchlike). This setting should only be used to override a misdetection or to manually This setting (if set) shall take precedence over automatically
configure the chassis type where automatic detection is not available.</para></listitem> detected information and is useful to override misdetected
configuration or to manually configure the chassis type where
automatic detection is not available.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>

View File

@ -980,7 +980,7 @@
otherwise.</para> otherwise.</para>
</refsect1> </refsect1>
<xi:include href="common-variables.xml" /> <xi:include href="less-variables.xml" />
<refsect1> <refsect1>
<title>See Also</title> <title>See Also</title>

View File

@ -428,7 +428,7 @@
<para>On success, 0 is returned, a non-zero failure code otherwise.</para> <para>On success, 0 is returned, a non-zero failure code otherwise.</para>
</refsect1> </refsect1>
<xi:include href="common-variables.xml" /> <xi:include href="less-variables.xml" />
<refsect1> <refsect1>
<title>See Also</title> <title>See Also</title>

View File

@ -2407,17 +2407,12 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
<xi:include href="common-variables.xml" xpointer="log-level"/> <xi:include href="less-variables.xml" xpointer="pager"/>
<xi:include href="common-variables.xml" xpointer="log-color"/> <xi:include href="less-variables.xml" xpointer="less"/>
<xi:include href="common-variables.xml" xpointer="log-time"/> <xi:include href="less-variables.xml" xpointer="lesscharset"/>
<xi:include href="common-variables.xml" xpointer="log-location"/> <xi:include href="less-variables.xml" xpointer="lesssecure"/>
<xi:include href="common-variables.xml" xpointer="log-target"/> <xi:include href="less-variables.xml" xpointer="colors"/>
<xi:include href="common-variables.xml" xpointer="pager"/> <xi:include href="less-variables.xml" xpointer="urlify"/>
<xi:include href="common-variables.xml" xpointer="less"/>
<xi:include href="common-variables.xml" xpointer="lesscharset"/>
<xi:include href="common-variables.xml" xpointer="lesssecure"/>
<xi:include href="common-variables.xml" xpointer="colors"/>
<xi:include href="common-variables.xml" xpointer="urlify"/>
</refsect1> </refsect1>
<refsect1> <refsect1>

View File

@ -782,7 +782,7 @@ Service b@0.service not loaded, b.socket cannot be started.
otherwise.</para> otherwise.</para>
</refsect1> </refsect1>
<xi:include href="common-variables.xml" /> <xi:include href="less-variables.xml" />
<refsect1> <refsect1>
<title>See Also</title> <title>See Also</title>

View File

@ -32,12 +32,29 @@
<refsect1> <refsect1>
<title>Description</title> <title>Description</title>
<para><filename>systemd-coredump@.service</filename> is a system service to process core dumps. It will <para><filename>systemd-coredump@.service</filename> is a system service that can acquire core
log a summary of the event to dumps from the kernel and handle them in various ways. The <command>systemd-coredump</command>
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, executable does the actual work. It is invoked twice: once as the handler by the kernel, and the
including information about the process identifier, owner, the signal that killed the process, and the second time in the <filename>systemd-coredump@.service</filename> to actually write the data to
stack trace if possible. It may also save the core dump for later processing. See the "Information about the journal.</para>
the crashed process" section below.</para>
<para>When the kernel invokes <command>systemd-coredump</command> to handle a core dump, it runs
in privileged mode, and will connect to the socket created by the
<filename>systemd-coredump.socket</filename> unit, which in turn will spawn an unprivileged
<filename>systemd-coredump@.service</filename> instance to process the core dump. Hence
<filename>systemd-coredump.socket</filename> and <filename>systemd-coredump@.service</filename>
are helper units which do the actual processing of core dumps and are subject to normal service
management.</para>
<para>Core dumps can be written to the journal or saved as a file. Once saved they can be retrieved
for further processing, for example in
<citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
</para>
<para>By default, <command>systemd-coredump</command> will log the core dump including a backtrace
if possible to the journal and store the core dump itself in an external file in
<filename>/var/lib/systemd/coredump</filename>. These core dumps are deleted after a few days by
default; see <filename>/usr/lib/tmpfiles.d/systemd.conf</filename> for details.</para>
<para>The behavior of a specific program upon reception of a signal is governed by a few <para>The behavior of a specific program upon reception of a signal is governed by a few
factors which are described in detail in factors which are described in detail in
@ -45,47 +62,14 @@
In particular, the core dump will only be processed when the related resource limits are sufficient. In particular, the core dump will only be processed when the related resource limits are sufficient.
</para> </para>
<para>Core dumps can be written to the journal or saved as a file. In both cases, they can be retrieved
for further processing, for example in
<citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
See <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
in particular the <command>list</command> and <command>debug</command> verbs.</para>
<para>By default, <command>systemd-coredump</command> will log the core dump to the journal, including a
backtrace if possible, and store the core dump (an image of the memory contents of the process) itself in
an external file in <filename>/var/lib/systemd/coredump</filename>. These core dumps are deleted after a
few days by default; see <filename>/usr/lib/tmpfiles.d/systemd.conf</filename> for details. Note that the
removal of core files from the file system and the purging of journal entries are independent, and the
core file may be present without the journal entry, and journal entries may point to since-removed core
files. Metadata is attached to core files in the form of extended attributes, so the core files may be
useful even without the full metadata available in the journal entry.
</para>
<refsect2>
<title>Invocation of <command>systemd-coredump</command></title>
<para>The <command>systemd-coredump</command> executable does the actual work. It is invoked twice:
once as the handler by the kernel, and the second time in the
<filename>systemd-coredump@.service</filename> to actually write the data to the journal and process
and save the core file.</para>
<para>When the kernel invokes <command>systemd-coredump</command> to handle a core dump, it runs in
privileged mode, and will connect to the socket created by the
<filename>systemd-coredump.socket</filename> unit, which in turn will spawn an unprivileged
<filename>systemd-coredump@.service</filename> instance to process the core dump. Hence
<filename>systemd-coredump.socket</filename> and <filename>systemd-coredump@.service</filename> are
helper units which do the actual processing of core dumps and are subject to normal service
management.</para>
<para>It is also possible to invoke <command>systemd-coredump</command> with <para>It is also possible to invoke <command>systemd-coredump</command> with
<option>--backtrace</option> option. In this case, <command>systemd-coredump</command> expects a <option>--backtrace</option> option. In this case, <command>systemd-coredump</command> expects
journal entry in the journal a journal entry in the journal
<ulink url="https://www.freedesktop.org/wiki/Software/systemd/export">Journal Export Format</ulink> <ulink url="https://www.freedesktop.org/wiki/Software/systemd/export">Journal Export Format</ulink>
on standard input. The entry should contain a <varname>MESSAGE=</varname> field and any additional on standard input. The entry should contain a <varname>MESSAGE=</varname> field and any additional
metadata fields the caller deems reasonable. <command>systemd-coredump</command> will append additional metadata fields the caller deems reasonable. <command>systemd-coredump</command> will append
metadata fields in the same way it does for core dumps received from the kernel. In this mode, no core additional metadata fields in the same way it does for core dumps received from the kernel. In
dump is stored in the journal.</para> this mode, no core dump is stored in the journal.</para>
</refsect2>
</refsect1> </refsect1>
<refsect1> <refsect1>
@ -134,241 +118,22 @@
<refsect2> <refsect2>
<title>Disabling coredump processing</title> <title>Disabling coredump processing</title>
<para>To disable potentially resource-intensive processing by <command>systemd-coredump</command>, set <para>To disable potentially resource-intensive processing by <command>systemd-coredump</command>,
<programlisting>Storage=none ProcessSizeMax=0</programlisting> in set <programlisting>Storage=none
ProcessSizeMax=0</programlisting> in
<citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para> </para>
</refsect2> </refsect2>
</refsect1> </refsect1>
<refsect1> <refsect1>
<title>Information about the crashed process</title> <title>Usage</title>
<para>Data stored in the journal can be viewed with
<para><citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> can <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
be used to retrieve saved core dumps independently of their location, to display information, and to as usual.
process them e.g. by passing to the GNU debugger (gdb).</para> <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
can be used to retrieve saved core dumps independent of their location, to display information and to process
<para>Data stored in the journal can be also viewed with them e.g. by passing to the GNU debugger (gdb).</para>
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> as usual
(or from any other process, using the
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry> API).
The relevant messages have <constant>MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1</constant>:</para>
<programlisting>$ journalctl MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1 -o verbose
MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1
COREDUMP_PID=552351
COREDUMP_UID=1000
COREDUMP_GID=1000
COREDUMP_SIGNAL_NAME=SIGSEGV
COREDUMP_SIGNAL=11
COREDUMP_TIMESTAMP=1614342930000000
COREDUMP_COMM=Web Content
COREDUMP_EXE=/usr/lib64/firefox/firefox
COREDUMP_USER_UNIT=app-gnome-firefox-552136.scope
COREDUMP_CMDLINE=/usr/lib64/firefox/firefox -contentproc -childID 5 -isForBrowser …
COREDUMP_CGROUP=/user.slice/user-1000.slice/user@1000.service/app.slice/app-….scope
COREDUMP_FILENAME=/var/lib/systemd/coredump/core.Web….552351.….zst
</programlisting>
<para>The following fields are saved (if known) with the journal entry</para>
<variablelist class='journal-directives'>
<varlistentry>
<term><varname>COREDUMP_UID=</varname></term>
<term><varname>COREDUMP_PID=</varname></term>
<term><varname>COREDUMP_GID=</varname></term>
<listitem><para>The process number (PID) and owner (UID and GID) of the crashed process.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP_TIMESTAMP=</varname></term>
<listitem><para>The time of the crash as reported by the kernel (in µs since the epoch).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP_RLIMIT=</varname></term>
<listitem><para>The core file size soft resource limit, see
<citerefentry project='man-pages'><refentrytitle>getrlimit</refentrytitle><manvolnum>2</manvolnum></citerefentry>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP_UNIT=</varname></term>
<term><varname>COREDUMP_SLICE=</varname></term>
<listitem><para>The system unit and slice names.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP_CGROUP=</varname></term>
<listitem><para>Control group information in the format used in
<filename>/proc/self/cgroup</filename>. On systems with the unified cgroup hierarchy, this is a
single path prefixed with <literal>0::</literal>, and multiple paths prefixed with controller numbers
on legacy systems.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP_OWNER_UID=</varname></term>
<term><varname>COREDUMP_USER_UNIT=</varname></term>
<listitem><para>The numerical UID of the user owning the login session or systemd user unit of the
crashed process, and the user manager unit. Both fields are only present for user processes.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP_SIGNAL_NAME=</varname></term>
<term><varname>COREDUMP_SIGNAL=</varname></term>
<listitem><para>The terminating signal name and numerical value. (Both are included because signal
numbers vary by architecture.)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP_CWD=</varname></term>
<term><varname>COREDUMP_ROOT=</varname></term>
<listitem><para>The current working directory and root directory of the crashed process.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP_OPEN_FDS=</varname></term>
<listitem><para>Information about open file descriptors, in the following format:</para>
<programlisting><replaceable>fd</replaceable>:<replaceable>/path/to/file</replaceable>
pos: ...
flags: ...
...
<replaceable>fd</replaceable>:<replaceable>/path/to/file</replaceable>
pos: ...
flags: ...
...
</programlisting>
<para>The first line contains the file descriptor number <replaceable>fd</replaceable> and the path,
while subsequent lines show the contents of
<filename>/proc/<replaceable>pid</replaceable>/fdinfo/<replaceable>fd</replaceable></filename>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP_COMM=</varname></term>
<term><varname>COREDUMP_EXE=</varname></term>
<term><varname>COREDUMP_PROC_STATUS=</varname></term>
<term><varname>COREDUMP_PROC_MAPS=</varname></term>
<term><varname>COREDUMP_PROC_LIMITS=</varname></term>
<term><varname>COREDUMP_PROC_MOUNTINFO=</varname></term>
<term><varname>COREDUMP_ENVIRON=</varname></term>
<listitem><para>Fields that map the per-process entries in the <filename>/proc/</filename>
filesystem: <filename>/proc/<replaceable>pid</replaceable>/comm</filename> (the command name
associated with the process), <filename>/proc/<replaceable>pid</replaceable>/exe</filename> (the
filename of the executed command), <filename>/proc/<replaceable>pid</replaceable>/status</filename>
(various metadata about the process), <filename>/proc/<replaceable>pid</replaceable>/maps</filename>
(memory regions visible to the process and their access permissions),
<filename>/proc/<replaceable>pid</replaceable>/limits</filename> (the soft and hard resource limits),
<filename>/proc/<replaceable>pid</replaceable>/mountinfo</filename> (mount points in the process's
mount namespace), <filename>/proc/<replaceable>pid</replaceable>/environ</filename>
(the environemnt block of the crashed process).</para>
<para>See
<citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more information.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP_HOSTNAME=</varname></term>
<listitem><para>The system hostname.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP_CONTAINER_CMDLINE=</varname></term>
<listitem><para>For processes running in a container, the commandline of the process spawning the
container (the first parent process with a different mount namespace).</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP=</varname></term>
<listitem><para>When the core is stored in the journal, the core image itself.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP_FILENAME=</varname></term>
<listitem><para>When the core is stored externally, the path the the core file.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>COREDUMP_TRUNCATED=</varname></term>
<listitem><para>Set to <literal>1</literal> when the saved coredump was truncated. (A partial core
image may still be processed by some tools, though obviously not all information is available.)
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>MESSAGE=</varname></term>
<listitem><para>The message generated by <command>systemd-coredump</command> that includes the
backtrace if it was successfully generated. When <command>systemd-coredump</command> is invoked with
<option>--backtrace</option>, this field is provided by the caller.</para></listitem>
</varlistentry>
</variablelist>
<para>Various other fields exist in the journal entry, but pertain to the logging process,
i.e. <command>systemd-coredump</command>, not the crashed process. See
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
</para>
<para>The following fields are saved (if known) with the external file listed in
<varname>COREDUMP_FILENAME=</varname> as extended attributes:</para>
<variablelist>
<varlistentry>
<term><varname>user.coredump.pid</varname></term>
<term><varname>user.coredump.uid</varname></term>
<term><varname>user.coredump.gid</varname></term>
<term><varname>user.coredump.signal</varname></term>
<term><varname>user.coredump.timestamp</varname></term>
<term><varname>user.coredump.rlimit</varname></term>
<term><varname>user.coredump.hostname</varname></term>
<term><varname>user.coredump.comm</varname></term>
<term><varname>user.coredump.exe</varname></term>
<listitem><para>Those are the same as <varname>COREDUMP_PID=</varname>,
<varname>COREDUMP_UID=</varname>, <varname>COREDUMP_GID=</varname>,
<varname>COREDUMP_SIGNAL=</varname>, <varname>COREDUMP_TIMESTAMP=</varname>,
<varname>COREDUMP_RLIMIT=</varname>, <varname>COREDUMP_HOSTNAME=</varname>,
<varname>COREDUMP_COMM=</varname>, and <varname>COREDUMP_EXE=</varname>, described above.
</para></listitem>
</varlistentry>
</variablelist>
<para>Those can be viewed using
<citerefentry project='man-pages'><refentrytitle>getfattr</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
For the core file described in the journal entry shown above:
<programlisting>$ getfattr --absolute-names -d /var/lib/systemd/coredump/core.Web….552351.….zst
# file: /var/lib/systemd/coredump/core.Web….552351.….zst
user.coredump.pid="552351"
user.coredump.uid="1000"
user.coredump.gid="1000"
user.coredump.signal="11"
user.coredump.timestamp="1614342930000000"
user.coredump.comm="Web Content"
user.coredump.exe="/usr/lib64/firefox/firefox"
</programlisting>
</para>
</refsect1> </refsect1>
<refsect1> <refsect1>

View File

@ -141,7 +141,7 @@
doing so.</para> doing so.</para>
</refsect1> </refsect1>
<xi:include href="common-variables.xml" /> <xi:include href="less-variables.xml" />
<refsect1> <refsect1>
<title>See Also</title> <title>See Also</title>

View File

@ -1486,7 +1486,7 @@
</refsect2> </refsect2>
</refsect1> </refsect1>
<xi:include href="common-variables.xml" /> <xi:include href="less-variables.xml" />
<refsect1> <refsect1>
<title>Examples</title> <title>Examples</title>

View File

@ -115,8 +115,8 @@
<refsect1> <refsect1>
<title>Protocols and Routing</title> <title>Protocols and Routing</title>
<para>The lookup requests that <filename>systemd-resolved.service</filename> receives are routed to the <para>Lookup requests are routed to the available DNS servers, LLMNR, and MulticastDNS interfaces
available DNS servers, LLMNR, and MulticastDNS interfaces according to the following rules:</para> according to the following rules:</para>
<itemizedlist> <itemizedlist>
<listitem><para>Names for which synthetic records are generated (the local hostname, <listitem><para>Names for which synthetic records are generated (the local hostname,
@ -172,8 +172,7 @@
<citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> for a <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> for a
description of globally configured DNS settings.</para> description of globally configured DNS settings.</para>
<para>The following query routing logic applies for unicast DNS lookups initiated by <para>The following query routing logic applies for unicast DNS traffic:</para>
<filename>systemd-resolved.service</filename>:</para>
<itemizedlist> <itemizedlist>
<listitem><para>If a name to look up matches (that is: is equal to or has as suffix) any of the <listitem><para>If a name to look up matches (that is: is equal to or has as suffix) any of the
@ -229,22 +228,8 @@
<itemizedlist> <itemizedlist>
<listitem><para>Some names are always resolved internally (see Synthetic Records above). Traditionally <listitem><para>Some names are always resolved internally (see Synthetic Records above). Traditionally
they would be resolved by <filename>nss-files</filename> if provided in they would be resolved by <filename>nss-files</filename>, and only if provided in
<filename>/etc/hosts</filename>. But note that the details of how a query is constructed are under the <filename>/etc/hosts</filename>.</para></listitem>
control of the client library. <filename>nss-dns</filename> will first try to resolve names using
search domains and even if those queries are routed to <filename>systemd-resolved</filename>, it will
send them out over the network using the usual rules for multi-label name routing <footnote><para>For
example, if <filename>/etc/nsswitch.conf</filename> has <programlisting>nameserver 127.0.0.53
search foobar.com barbar.com
</programlisting>and we look up <literal>localhost</literal>, <filename>nss-dns</filename> will send
the following queries to <filename>systemd-resolved</filename> listening on 127.0.0.53:53: first
<literal>localhost.foobar.com</literal>, then <literal>localhost.barbar.com</literal>, and finally
<literal>localhost</literal>. If (hopefully) the first two queries fail,
<filename>systemd-resolved</filename> will synthesize an answer for the third query.</para>
<para>When using <filename>nss-dns</filename> with any search domains, it is thus crucial to always
configure <filename>nss-files</filename> with higher priority and provide mappings for names that
should not be resolved using search domains.</para></footnote>.</para></listitem>
<listitem><para>Single-label names are not resolved for A and AAAA records using unicast DNS (unless <listitem><para>Single-label names are not resolved for A and AAAA records using unicast DNS (unless
overridden with <varname>ResolveUnicastSingleLabel=</varname>, see overridden with <varname>ResolveUnicastSingleLabel=</varname>, see
@ -261,13 +246,13 @@ search foobar.com barbar.com
has failed, as absolute, while other names would be resolved in opposite order. The has failed, as absolute, while other names would be resolved in opposite order. The
<varname>ndots</varname> option in <filename>/etc/resolv.conf</filename> was used to control how many <varname>ndots</varname> option in <filename>/etc/resolv.conf</filename> was used to control how many
dots the name needs to have to be resolved as relative first. This stub resolver does not implement dots the name needs to have to be resolved as relative first. This stub resolver does not implement
this at all: multi-label names are only resolved as FQDNs.<footnote><para>There are currently more than this at all: multi-label names are only resolved as FQDNs. (There are currently more than 1500
1500 top-level domain names defined, and new ones are added regularly, often using "attractive" names top-level domain names defined, and new ones are added regularly, often using "attractive" names that
that are also likely to be used locally. Not looking up multi-label names in this fashion avoids are also likely to be used locally. Not looking up multi-label names in this fashion avoids fragility
fragility in both directions: a valid global name could be obscured by a local name, and resolution of in both directions: a valid global name could be obscured by a local name, and resolution of a relative
a relative local name could suddenly break when a new top-level domain is created, or when a new local name could suddenly break when a new top-level domain is created, or when a new subdomain of a
subdomain of a top-level domain in registered. Resolving any given name as either relative or absolute top-level domain in registered. Resolving any given name as either relative or absolute avoids this
avoids this ambiguity.)</para></footnote></para></listitem> ambiguity.)</para></listitem>
<listitem><para>This resolver has a notion of the special <literal>.local</literal> domain used for <listitem><para>This resolver has a notion of the special <literal>.local</literal> domain used for
MulticastDNS, and will not route queries with that suffix to unicast DNS servers unless explicitly MulticastDNS, and will not route queries with that suffix to unicast DNS servers unless explicitly

View File

@ -60,20 +60,6 @@
<citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
</refsect1> </refsect1>
<refsect1>
<title>Environment</title>
<para>Special variables understood by <command>systemd-sysv-generator</command>:</para>
<variablelist class='environment-variables'>
<varlistentry>
<term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
<listitem><para>Controls where systemd looks for SysV init scripts.</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1> <refsect1>
<title>See Also</title> <title>See Also</title>
<para> <para>

View File

@ -48,20 +48,23 @@
<refsect1> <refsect1>
<title>Description</title> <title>Description</title>
<para><command>systemd-tmpfiles</command> creates, deletes, and cleans up volatile and temporary files <para><command>systemd-tmpfiles</command> creates, deletes, and
and directories, using the configuration file format and location specified in cleans up volatile and temporary files and directories, based on
<citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>. It must the configuration file format and location specified in
be invoked with one or more options <option>--create</option>, <option>--remove</option>, and <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
<option>--clean</option>, to select the respective subset of operations.</para> </para>
<para>By default, directives from all configuration files are applied. When invoked with <para>If invoked with no arguments, it applies all directives from all configuration
<option>--replace=<replaceable>PATH</replaceable></option>, arguments specified on the command line are files. When invoked with <option>--replace=<replaceable>PATH</replaceable></option>,
used instead of the configuration file <replaceable>PATH</replaceable>. Otherwise, if one or more arguments specified on the command line are used instead of the configuration file
absolute filenames are passed on the command line, only the directives in these files are applied. If <replaceable>PATH</replaceable>. Otherwise, if one or more absolute filenames are
<literal>-</literal> is specified instead of a filename, directives are read from standard input. If only passed on the command line, only the directives in these files are applied. If
the basename of a configuration file is specified, all configuration directories as specified in <literal>-</literal> is specified instead of a filename, directives are read from
<citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> are standard input. If only the basename of a configuration file is specified, all
searched for a matching file and the file found that has the highest priority is executed.</para> configuration directories as specified in
<citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
are searched for a matching file and the file found that has the highest priority is
executed.</para>
<para>System services (<filename>systemd-tmpfiles-setup.service</filename>, <para>System services (<filename>systemd-tmpfiles-setup.service</filename>,
<filename>systemd-tmpfiles-setup-dev.service</filename>, <filename>systemd-tmpfiles-setup-dev.service</filename>,
@ -78,12 +81,6 @@
system instance, such as the one typically configured for <filename>/tmp/</filename>, will thus also system instance, such as the one typically configured for <filename>/tmp/</filename>, will thus also
affect files created by the user instance if they are placed in <filename>/tmp/</filename>, even if the affect files created by the user instance if they are placed in <filename>/tmp/</filename>, even if the
user instance's time-based cleanup is turned off.</para> user instance's time-based cleanup is turned off.</para>
<para>To re-apply settings after configuration has been modified, simply restart
<filename>systemd-tmpfiles-clean.service</filename>, which will apply any settings which can be safely
executed at runtime. To debug <command>systemd-tmpfiles</command>, it may be useful to invoke it
directly from the command line with increased log level (see <varname>$SYSTEMD_LOG_LEVEL</varname>
below).</para>
</refsect1> </refsect1>
<refsect1> <refsect1>
@ -230,24 +227,6 @@
<programlisting>systemd-tmpfiles --remove --create</programlisting> <programlisting>systemd-tmpfiles --remove --create</programlisting>
</refsect1> </refsect1>
<refsect1>
<title>Environment</title>
<variablelist class='environment-variables'>
<xi:include href="common-variables.xml" xpointer="log-level" />
<xi:include href="common-variables.xml" xpointer="log-color" />
<xi:include href="common-variables.xml" xpointer="log-time" />
<xi:include href="common-variables.xml" xpointer="log-location" />
<xi:include href="common-variables.xml" xpointer="log-target" />
<xi:include href="common-variables.xml" xpointer="pager" />
<xi:include href="common-variables.xml" xpointer="less" />
<xi:include href="common-variables.xml" xpointer="lesscharset" />
<xi:include href="common-variables.xml" xpointer="lesssecure" />
<xi:include href="common-variables.xml" xpointer="colors" />
<xi:include href="common-variables.xml" xpointer="urlify" />
</variablelist>
</refsect1>
<refsect1> <refsect1>
<title>Unprivileged --cleanup operation</title> <title>Unprivileged --cleanup operation</title>

View File

@ -2263,24 +2263,18 @@ SystemCallErrorNumber=EPERM</programlisting>
<varlistentry> <varlistentry>
<term><varname>Environment=</varname></term> <term><varname>Environment=</varname></term>
<listitem><para>Sets environment variables for executed processes. Each line is unquoted using the <listitem><para>Sets environment variables for executed processes. Takes a space-separated list of
rules described in "Quoting" section in variable assignments. This option may be specified more than once, in which case all listed variables
<citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>5</manvolnum></citerefentry> will be set. If the same variable is set twice, the later setting will override the earlier
and becomes a list of variable assignments. If you need to assign a value containing spaces or the setting. If the empty string is assigned to this option, the list of environment variables is reset,
equals sign to a variable, put quotes around the whole assignment. Variable expansion is not all prior assignments have no effect. Variable expansion is not performed inside the strings,
performed inside the strings and the <literal>$</literal> character has no special meaning. Specifier however, specifier expansion is possible. The <literal>$</literal> character has no special
expansion is performed, see the "Specifiers" section in meaning. If you need to assign a value containing spaces or the equals sign to a variable, use double
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. quotes (") for the assignment.</para>
</para>
<para>This option may be specified more than once, in which case all listed variables will be set. If <para>The names of the variables can contain ASCII letters, digits, and the underscore
the same variable is listed twice, the later setting will override the earlier setting. If the empty character. Variable names cannot be empty or start with a digit. In variable values, most characters
string is assigned to this option, the list of environment variables is reset, all prior assignments are allowed, but non-printable characters are currently rejected.</para>
have no effect.</para>
<para>The names of the variables can contain ASCII letters, digits, and the underscore character.
Variable names cannot be empty or start with a digit. In variable values, most characters are
allowed, but non-printable characters are currently rejected.</para>
<para>Example: <para>Example:
<programlisting>Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6"</programlisting> <programlisting>Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6"</programlisting>
@ -2290,9 +2284,10 @@ SystemCallErrorNumber=EPERM</programlisting>
<literal>word3</literal>, <literal>$word 5 6</literal>. <literal>word3</literal>, <literal>$word 5 6</literal>.
</para> </para>
<para>See <citerefentry <para>
project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> for See <citerefentry
details about environment variables.</para> project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> for details
about environment variables.</para>
<para>Note that environment variables are not suitable for passing secrets (such as passwords, key <para>Note that environment variables are not suitable for passing secrets (such as passwords, key
material, …) to service processes. Environment variables set for a unit are exposed to unprivileged material, …) to service processes. Environment variables set for a unit are exposed to unprivileged

View File

@ -1107,9 +1107,11 @@
</variablelist> </variablelist>
<para>Check <para>Check
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> and <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
<citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more and
settings.</para> <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more settings.</para>
</refsect1> </refsect1>
<refsect1> <refsect1>
@ -1124,13 +1126,21 @@
<varname>ExecStop=</varname>, and <varname>ExecStop=</varname>, and
<varname>ExecStopPost=</varname> options.</para> <varname>ExecStopPost=</varname> options.</para>
<para>Multiple command lines may be concatenated in a single directive by separating them with semicolons <para>Multiple command lines may be concatenated in a single
(these semicolons must be passed as separate words). Lone semicolons may be escaped as directive by separating them with semicolons (these semicolons
<literal>\;</literal>.</para> must be passed as separate words). Lone semicolons may be escaped
as <literal>\;</literal>.</para>
<para>Each command line is unquoted using the rules described in "Quoting" section in <para>Each command line is split on whitespace, with the first item being the command to
<citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>5</manvolnum></citerefentry>. The execute, and the subsequent items being the arguments. Double quotes ("…") and single quotes
first item becomes the command to execute, and the subsequent items the arguments.</para> ('…') may be used to wrap a whole item (the opening quote may appear only at the beginning or
after whitespace that is not quoted, and the closing quote must be followed by whitespace or the
end of line), in which case everything until the next matching quote becomes part of the same
argument. Quotes themselves are removed. C-style escapes are also supported. The table below
contains the list of known escape patterns. Only escape patterns which match the syntax in the
table are allowed; other patterns may be added in the future and unknown patterns will result in
a warning. In particular, any backslashes should be doubled. Finally, a trailing backslash
(<literal>\</literal>) may be used to merge lines.</para>
<para>This syntax is inspired by shell syntax, but only the meta-characters and expansions <para>This syntax is inspired by shell syntax, but only the meta-characters and expansions
described in the following paragraphs are understood, and the expansion of variables is described in the following paragraphs are understood, and the expansion of variables is
@ -1230,6 +1240,74 @@ ls</programlisting>
<literal>&gt;/dev/null</literal>, <literal>&gt;/dev/null</literal>,
<literal>&amp;</literal>, <literal>;</literal>, and <literal>&amp;</literal>, <literal>;</literal>, and
<literal>ls</literal>.</para> <literal>ls</literal>.</para>
<table>
<title>C escapes supported in command lines and environment variables</title>
<tgroup cols='2'>
<colspec colname='escape' />
<colspec colname='meaning' />
<thead>
<row>
<entry>Literal</entry>
<entry>Actual value</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>\a</literal></entry>
<entry>bell</entry>
</row>
<row>
<entry><literal>\b</literal></entry>
<entry>backspace</entry>
</row>
<row>
<entry><literal>\f</literal></entry>
<entry>form feed</entry>
</row>
<row>
<entry><literal>\n</literal></entry>
<entry>newline</entry>
</row>
<row>
<entry><literal>\r</literal></entry>
<entry>carriage return</entry>
</row>
<row>
<entry><literal>\t</literal></entry>
<entry>tab</entry>
</row>
<row>
<entry><literal>\v</literal></entry>
<entry>vertical tab</entry>
</row>
<row>
<entry><literal>\\</literal></entry>
<entry>backslash</entry>
</row>
<row>
<entry><literal>\"</literal></entry>
<entry>double quotation mark</entry>
</row>
<row>
<entry><literal>\'</literal></entry>
<entry>single quotation mark</entry>
</row>
<row>
<entry><literal>\s</literal></entry>
<entry>space</entry>
</row>
<row>
<entry><literal>\x<replaceable>xx</replaceable></literal></entry>
<entry>character number <replaceable>xx</replaceable> in hexadecimal encoding</entry>
</row>
<row>
<entry><literal>\<replaceable>nnn</replaceable></literal></entry>
<entry>character number <replaceable>nnn</replaceable> in octal encoding</entry>
</row>
</tbody>
</tgroup>
</table>
</refsect1> </refsect1>
<refsect1> <refsect1>

View File

@ -74,10 +74,10 @@
<filename>.ini</filename> files. <filename>.ini</filename> files.
</para> </para>
<para>Each file is a plain text file divided into sections, with configuration entries in the style <para>Each file is a plain text file divided into sections, with configuration entries in the
<replaceable>key</replaceable>=<replaceable>value</replaceable>. Whitespace immediately before or after style <replaceable>key</replaceable>=<replaceable>value</replaceable>.
the <literal>=</literal> is ignored. Empty lines and lines starting with <literal>#</literal> or Whitespace immediately before or after the <literal>=</literal> is ignored. Empty lines and lines starting with <literal>#</literal> or <literal>;</literal> are
<literal>;</literal> are ignored, which may be used for commenting.</para> ignored, which may be used for commenting.</para>
<para>Lines ending in a backslash are concatenated with the following line while reading and the <para>Lines ending in a backslash are concatenated with the following line while reading and the
backslash is replaced by a space character. This may be used to wrap long lines. The limit on backslash is replaced by a space character. This may be used to wrap long lines. The limit on
@ -129,88 +129,6 @@ KeyThree=value 3\
file format.</para> file format.</para>
</refsect1> </refsect1>
<refsect1>
<title>Quoting</title>
<para>For settings where quoting is allowed, the following general rules apply: double quotes ("…") and
single quotes ('…') may be used to wrap a whole item (the opening quote may appear only at the beginning
or after whitespace that is not quoted, and the closing quote must be followed by whitespace or the end
of line), in which case everything until the next matching quote becomes part of the same item. Quotes
themselves are removed. C-style escapes are also supported. The table below contains the list of known
escape patterns. Only escape patterns which match the syntax in the table are allowed; other patterns may
be added in the future and unknown patterns will result in a warning. In particular, any backslashes
should be doubled. Finally, a trailing backslash (<literal>\</literal>) may be used to merge lines, as
described above.</para>
<table>
<title>Supported C escapes</title>
<tgroup cols='2'>
<colspec colname='escape' />
<colspec colname='meaning' />
<thead>
<row>
<entry>Literal</entry>
<entry>Actual value</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>\a</literal></entry>
<entry>bell</entry>
</row>
<row>
<entry><literal>\b</literal></entry>
<entry>backspace</entry>
</row>
<row>
<entry><literal>\f</literal></entry>
<entry>form feed</entry>
</row>
<row>
<entry><literal>\n</literal></entry>
<entry>newline</entry>
</row>
<row>
<entry><literal>\r</literal></entry>
<entry>carriage return</entry>
</row>
<row>
<entry><literal>\t</literal></entry>
<entry>tab</entry>
</row>
<row>
<entry><literal>\v</literal></entry>
<entry>vertical tab</entry>
</row>
<row>
<entry><literal>\\</literal></entry>
<entry>backslash</entry>
</row>
<row>
<entry><literal>\"</literal></entry>
<entry>double quotation mark</entry>
</row>
<row>
<entry><literal>\'</literal></entry>
<entry>single quotation mark</entry>
</row>
<row>
<entry><literal>\s</literal></entry>
<entry>space</entry>
</row>
<row>
<entry><literal>\x<replaceable>xx</replaceable></literal></entry>
<entry>character number <replaceable>xx</replaceable> in hexadecimal encoding</entry>
</row>
<row>
<entry><literal>\<replaceable>nnn</replaceable></literal></entry>
<entry>character number <replaceable>nnn</replaceable> in octal encoding</entry>
</row>
</tbody>
</tgroup>
</table>
</refsect1>
<refsect1> <refsect1>
<title>See Also</title> <title>See Also</title>
<para> <para>

View File

@ -976,24 +976,16 @@
<term><varname>JobTimeoutSec=</varname></term> <term><varname>JobTimeoutSec=</varname></term>
<term><varname>JobRunningTimeoutSec=</varname></term> <term><varname>JobRunningTimeoutSec=</varname></term>
<listitem><para><varname>JobTimeoutSec=</varname> specifies a timeout for the whole job that starts <listitem><para>When a job for this unit is queued, a timeout <varname>JobTimeoutSec=</varname> may be
running when the job is queued. <varname>JobRunningTimeoutSec=</varname> specifies a timeout that configured. Similarly, <varname>JobRunningTimeoutSec=</varname> starts counting when the queued job is actually
starts running when the queued job is actually started. If either limit is reached, the job will be started. If either time limit is reached, the job will be cancelled, the unit however will not change state or
cancelled, the unit however will not change state or even enter the <literal>failed</literal> mode. even enter the <literal>failed</literal> mode. This value defaults to <literal>infinity</literal> (job timeouts
</para> disabled), except for device units (<varname>JobRunningTimeoutSec=</varname> defaults to
<varname>DefaultTimeoutStartSec=</varname>). NB: this timeout is independent from any unit-specific timeout
<para>Both settings take a time span with the default unit of seconds, but other units may be (for example, the timeout set with <varname>TimeoutStartSec=</varname> in service units) as the job timeout has
specified, see no effect on the unit itself, only on the job that might be pending for it. Or in other words: unit-specific
<citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>5</manvolnum></citerefentry>. timeouts are useful to abort unit state changes, and revert them. The job timeout set with this option however
The default is <literal>infinity</literal> (job timeouts disabled), except for device units where is useful to abort only the job waiting for the unit state to change.</para>
<varname>JobRunningTimeoutSec=</varname> defaults to <varname>DefaultTimeoutStartSec=</varname>.
</para>
<para>Note: these timeouts are independent from any unit-specific timeouts (for example, the timeout
set with <varname>TimeoutStartSec=</varname> in service units). The job timeout has no effect on the
unit itself. Or in other words: unit-specific timeouts are useful to abort unit state changes, and
revert them. The job timeout set with this option however is useful to abort only the job waiting for
the unit state to change.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -1001,14 +993,13 @@
<term><varname>JobTimeoutAction=</varname></term> <term><varname>JobTimeoutAction=</varname></term>
<term><varname>JobTimeoutRebootArgument=</varname></term> <term><varname>JobTimeoutRebootArgument=</varname></term>
<listitem><para><varname>JobTimeoutAction=</varname> optionally configures an additional action to <listitem><para><varname>JobTimeoutAction=</varname> optionally configures an additional action to take when
take when the timeout is hit, see description of <varname>JobTimeoutSec=</varname> and the timeout is hit, see description of <varname>JobTimeoutSec=</varname> and
<varname>JobRunningTimeoutSec=</varname> above. It takes the same values as <varname>JobRunningTimeoutSec=</varname> above. It takes the same values as
<varname>StartLimitAction=</varname>. Defaults to <option>none</option>.</para> <varname>StartLimitAction=</varname>. Defaults to <option>none</option>.
<varname>JobTimeoutRebootArgument=</varname> configures an optional reboot string to pass to the
<para><varname>JobTimeoutRebootArgument=</varname> configures an optional reboot string to pass to <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry> system call.
the <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry> system </para></listitem>
call.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -1016,39 +1007,28 @@
<term><varname>StartLimitBurst=<replaceable>burst</replaceable></varname></term> <term><varname>StartLimitBurst=<replaceable>burst</replaceable></varname></term>
<listitem><para>Configure unit start rate limiting. Units which are started more than <listitem><para>Configure unit start rate limiting. Units which are started more than
<replaceable>burst</replaceable> times within an <replaceable>interval</replaceable> time span are <replaceable>burst</replaceable> times within an <replaceable>interval</replaceable> time interval are not
not permitted to start any more. Use <varname>StartLimitIntervalSec=</varname> to configure the permitted to start any more. Use <varname>StartLimitIntervalSec=</varname> to configure the checking interval
checking interval and <varname>StartLimitBurst=</varname> to configure how many starts per interval (defaults to <varname>DefaultStartLimitIntervalSec=</varname> in manager configuration file, set it to 0 to
are allowed.</para> disable any kind of rate limiting). Use <varname>StartLimitBurst=</varname> to configure how many starts per
interval are allowed (defaults to <varname>DefaultStartLimitBurst=</varname> in manager configuration
<para><replaceable>interval</replaceable> is a time span with the default unit of seconds, but other file). These configuration options are particularly useful in conjunction with the service setting
units may be specified, see
<citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
Defaults to <varname>DefaultStartLimitIntervalSec=</varname> in manager configuration file, and may
be set to 0 to disable any kind of rate limiting. <replaceable>burst</replaceable> is a number and
defaults to <varname>DefaultStartLimitBurst=</varname> in manager configuration file.</para>
<para>These configuration options are particularly useful in conjunction with the service setting
<varname>Restart=</varname> (see <varname>Restart=</varname> (see
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>); <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>); however,
however, they apply to all kinds of starts (including manual), not just those triggered by the they apply to all kinds of starts (including manual), not just those triggered by the
<varname>Restart=</varname> logic.</para> <varname>Restart=</varname> logic. Note that units which are configured for <varname>Restart=</varname> and
which reach the start limit are not attempted to be restarted anymore; however, they may still be restarted
manually at a later point, after the <replaceable>interval</replaceable> has passed. From this point on, the
restart logic is activated again. Note that <command>systemctl reset-failed</command> will cause the restart
rate counter for a service to be flushed, which is useful if the administrator wants to manually start a unit
and the start limit interferes with that. Note that this rate-limiting is enforced after any unit condition
checks are executed, and hence unit activations with failing conditions do not count towards this rate
limit. This setting does not apply to slice, target, device, and scope units, since they are unit types whose
activation may either never fail, or may succeed only a single time.</para>
<para>Note that units which are configured for <varname>Restart=</varname>, and which reach the start <para>When a unit is unloaded due to the garbage collection logic (see above) its rate limit counters are
limit are not attempted to be restarted anymore; however, they may still be restarted manually at a flushed out too. This means that configuring start rate limiting for a unit that is not referenced continuously
later point, after the <replaceable>interval</replaceable> has passed. From that point on, the has no effect.</para></listitem>
restart logic is activated again. <command>systemctl reset-failed</command> will cause the restart
rate counter for a service to be flushed, which is useful if the administrator wants to manually
start a unit and the start limit interferes with that. Rate-limiting is enforced after any unit
condition checks are executed, and hence unit activations with failing conditions do not count
towards the rate limit.</para>
<para>When a unit is unloaded due to the garbage collection logic (see above) its rate limit counters
are flushed out too. This means that configuring start rate limiting for a unit that is not
referenced continuously has no effect.</para>
<para>This setting does not apply to slice, target, device, and scope units, since they are unit
types whose activation may either never fail, or may succeed only a single time.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>

View File

@ -628,44 +628,40 @@
<para>Some of the variables understood by <command>systemd</command>:</para> <para>Some of the variables understood by <command>systemd</command>:</para>
<variablelist class='environment-variables'> <variablelist class='environment-variables'>
<varlistentry>
<term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
<listitem><xi:include href="common-variables.xml" xpointer="log-level-body" />
<para>This can be overridden with <option>--log-level=</option>.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>$SYSTEMD_LOG_COLOR</varname></term> <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
<listitem><xi:include href="common-variables.xml" xpointer="log-color-body" /> <listitem><para>Controls whether systemd highlights important log messages. This can be overridden
with <option>--log-color=</option>.</para></listitem>
<para>This can be overridden with <option>--log-color=</option>.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><varname>$SYSTEMD_LOG_TIME</varname></term> <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
<listitem><xi:include href="common-variables.xml" xpointer="log-time-body" /> <listitem><para>systemd reads the log level from this environment variable. This can be overridden
with <option>--log-level=</option>.</para></listitem>
<para>This can be overridden with <option>--log-time=</option>.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><varname>$SYSTEMD_LOG_LOCATION</varname></term> <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
<listitem><xi:include href="common-variables.xml" xpointer="log-location-body" /> <listitem><para>Controls whether systemd prints the code location along with log messages. This can
be overridden with <option>--log-location=</option>.</para></listitem>
<para>This can be overridden with <option>--log-location=</option>.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>$SYSTEMD_LOG_TID</varname></term>
<listitem><xi:include href="common-variables.xml" xpointer="log-tid-body" /></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><varname>$SYSTEMD_LOG_TARGET</varname></term> <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
<listitem><xi:include href="common-variables.xml" xpointer="log-target-body" /> <listitem><para>systemd reads the log target from this environment variable. This can be overridden
with <option>--log-target=</option>.</para></listitem>
</varlistentry>
<para>This can be overridden with <option>--log-target=</option>.</para></listitem> <varlistentry>
<term><varname>$SYSTEMD_LOG_TIME</varname></term>
<listitem><para>Controls whether systemd prefixes log messages with the current time. This can be
overridden with <option>--log-time=</option>.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>$SYSTEMD_LOG_TID</varname></term>
<listitem><para>Controls whether systemd prefixes log messages with the current thread ID
(TID).</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -696,6 +692,13 @@
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term>
<listitem><para>Controls where systemd looks for SysV init
scripts.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term> <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term>
@ -703,12 +706,12 @@
script runlevel link farms.</para></listitem> script runlevel link farms.</para></listitem>
</varlistentry> </varlistentry>
<xi:include href="common-variables.xml" xpointer="pager"/> <xi:include href="less-variables.xml" xpointer="pager"/>
<xi:include href="common-variables.xml" xpointer="less"/> <xi:include href="less-variables.xml" xpointer="less"/>
<xi:include href="common-variables.xml" xpointer="lesscharset"/> <xi:include href="less-variables.xml" xpointer="lesscharset"/>
<xi:include href="common-variables.xml" xpointer="lesssecure"/> <xi:include href="less-variables.xml" xpointer="lesssecure"/>
<xi:include href="common-variables.xml" xpointer="colors"/> <xi:include href="less-variables.xml" xpointer="colors"/>
<xi:include href="common-variables.xml" xpointer="urlify"/> <xi:include href="less-variables.xml" xpointer="urlify"/>
<varlistentry> <varlistentry>
<term><varname>$LISTEN_PID</varname></term> <term><varname>$LISTEN_PID</varname></term>

View File

@ -253,7 +253,7 @@
<para>On success, 0 is returned, a non-zero failure code otherwise.</para> <para>On success, 0 is returned, a non-zero failure code otherwise.</para>
</refsect1> </refsect1>
<xi:include href="common-variables.xml" /> <xi:include href="less-variables.xml" />
<refsect1> <refsect1>
<title>Examples</title> <title>Examples</title>

View File

@ -73,7 +73,7 @@
the current server does not satisfy this limit, <command>systemd-timesyncd</command> will switch the current server does not satisfy this limit, <command>systemd-timesyncd</command> will switch
to a different server.</para> to a different server.</para>
<para>Takes a time span value. The default unit is seconds, but other units may be specified, see <para>Takes a time value. The default unit is seconds, but other units may be specified, see
<citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>5</manvolnum></citerefentry>. <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
Defaults to 5 seconds.</para></listitem> Defaults to 5 seconds.</para></listitem>
</varlistentry> </varlistentry>
@ -85,9 +85,8 @@
minimum poll interval, and is adjusted within the specified limits in response to received packets. minimum poll interval, and is adjusted within the specified limits in response to received packets.
</para> </para>
<para>Each setting takes a time span value. The default unit is seconds, but other units may be <para>Each setting takes a time value. The default unit is seconds, but other units may be specified,
specified, see see <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
<citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
<varname>PollIntervalMinSec=</varname> defaults to 32 seconds and must not be smaller than <varname>PollIntervalMinSec=</varname> defaults to 32 seconds and must not be smaller than
16 seconds. <varname>PollIntervalMaxSec=</varname> defaults to 34 min 8 s (2048 seconds) and must be 16 seconds. <varname>PollIntervalMaxSec=</varname> defaults to 34 min 8 s (2048 seconds) and must be
larger than <varname>PollIntervalMinSec=</varname>.</para></listitem> larger than <varname>PollIntervalMinSec=</varname>.</para></listitem>
@ -98,7 +97,7 @@
<listitem><para>Specifies the minimum delay before subsequent attempts to contact a new NTP server <listitem><para>Specifies the minimum delay before subsequent attempts to contact a new NTP server
are made.</para> are made.</para>
<para>Takes a time span value. The default unit is seconds, but other units may be specified, see <para>Takes a time value. The default unit is seconds, but other units may be specified, see
<citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>5</manvolnum></citerefentry>. <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
Defaults to 30 seconds and must not be smaller than 1 second.</para></listitem> Defaults to 30 seconds and must not be smaller than 1 second.</para></listitem>
</varlistentry> </varlistentry>

View File

@ -79,16 +79,14 @@
<varlistentry> <varlistentry>
<term><literal>==</literal></term> <term><literal>==</literal></term>
<listitem> <listitem>
<para>Compare for equality. (The specified key has the specified value.)</para> <para>Compare for equality.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><literal>!=</literal></term> <term><literal>!=</literal></term>
<listitem> <listitem>
<para>Compare for inequality. (The specified key doesn't have the specified value, or the <para>Compare for inequality.</para>
specified key is not present at all.)
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -168,13 +166,6 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>KERNELS</varname></term>
<listitem>
<para>Search the devpath upwards for a matching device name.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>NAME</varname></term> <term><varname>NAME</varname></term>
<listitem> <listitem>
@ -199,14 +190,6 @@
<para>Match the subsystem of the event device.</para> <para>Match the subsystem of the event device.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>SUBSYSTEMS</varname></term>
<listitem>
<para>Search the devpath upwards for a matching device subsystem name.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>DRIVER</varname></term> <term><varname>DRIVER</varname></term>
<listitem> <listitem>
@ -214,6 +197,36 @@
which are bound to a driver at the time the event is generated.</para> which are bound to a driver at the time the event is generated.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>ATTR{<replaceable>filename</replaceable>}</varname></term>
<listitem>
<para>Match sysfs attribute values of the event device. Trailing
whitespace in the attribute values is ignored unless the specified match
value itself contains trailing whitespace.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>SYSCTL{<replaceable>kernel parameter</replaceable>}</varname></term>
<listitem>
<para>Match a kernel parameter value.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>KERNELS</varname></term>
<listitem>
<para>Search the devpath upwards for a matching device name.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>SUBSYSTEMS</varname></term>
<listitem>
<para>Search the devpath upwards for a matching device subsystem name.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>DRIVERS</varname></term> <term><varname>DRIVERS</varname></term>
@ -222,32 +235,20 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>ATTR{<replaceable>filename</replaceable>}</varname></term>
<listitem>
<para>Match sysfs attribute value of the event device.</para>
<para>Trailing whitespace in the attribute values is ignored unless the specified match value
itself contains trailing whitespace.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>ATTRS{<replaceable>filename</replaceable>}</varname></term> <term><varname>ATTRS{<replaceable>filename</replaceable>}</varname></term>
<listitem> <listitem>
<para>Search the devpath upwards for a device with matching sysfs attribute values. If <para>Search the devpath upwards for a device with matching sysfs attribute values.
multiple <varname>ATTRS</varname> matches are specified, all of them must match on the same If multiple <varname>ATTRS</varname> matches are specified, all of them
device.</para> must match on the same device. Trailing whitespace in the attribute values is ignored
unless the specified match value itself contains trailing whitespace.</para>
<para>Trailing whitespace in the attribute values is ignored unless the specified match value
itself contains trailing whitespace.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><varname>SYSCTL{<replaceable>kernel parameter</replaceable>}</varname></term> <term><varname>TAGS</varname></term>
<listitem> <listitem>
<para>Match a kernel parameter value.</para> <para>Search the devpath upwards for a device with matching tag.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -291,13 +292,6 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>TAGS</varname></term>
<listitem>
<para>Search the devpath upwards for a device with matching tag.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>TEST{<replaceable>octal mode mask</replaceable>}</varname></term> <term><varname>TEST{<replaceable>octal mode mask</replaceable>}</varname></term>
<listitem> <listitem>

View File

@ -256,7 +256,7 @@ AuthorizedKeysCommandUser root
<para>On success, 0 is returned, a non-zero failure code otherwise.</para> <para>On success, 0 is returned, a non-zero failure code otherwise.</para>
</refsect1> </refsect1>
<xi:include href="common-variables.xml" /> <xi:include href="less-variables.xml" />
<refsect1> <refsect1>
<title>See Also</title> <title>See Also</title>

View File

@ -5,15 +5,15 @@
# Frank Hill <hxf.prc@gmail.com>, 2014. # Frank Hill <hxf.prc@gmail.com>, 2014.
# Boyuan Yang <073plan@gmail.com>, 2015. # Boyuan Yang <073plan@gmail.com>, 2015.
# Jeff Bai <jeffbai@aosc.xyz>, 2016. # Jeff Bai <jeffbai@aosc.xyz>, 2016.
# Charles Lee <lchopn@gmail.com>, 2020, 2021. # Charles Lee <lchopn@gmail.com>, 2020.
# Whired Planck <fungdaat31@outlook.com>, 2020. # Whired Planck <fungdaat31@outlook.com>, 2020.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: systemd\n" "Project-Id-Version: systemd\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-08 17:48+0100\n" "POT-Creation-Date: 2021-01-08 17:48+0100\n"
"PO-Revision-Date: 2021-03-01 09:40+0000\n" "PO-Revision-Date: 2020-11-28 13:35+0000\n"
"Last-Translator: Charles Lee <lchopn@gmail.com>\n" "Last-Translator: Whired Planck <fungdaat31@outlook.com>\n"
"Language-Team: Chinese (Simplified) <https://translate.fedoraproject.org/" "Language-Team: Chinese (Simplified) <https://translate.fedoraproject.org/"
"projects/systemd/master/zh_CN/>\n" "projects/systemd/master/zh_CN/>\n"
"Language: zh_CN\n" "Language: zh_CN\n"
@ -21,7 +21,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.4.2\n" "X-Generator: Weblate 4.3.2\n"
#: src/core/org.freedesktop.systemd1.policy.in:22 #: src/core/org.freedesktop.systemd1.policy.in:22
msgid "Send passphrase back to system" msgid "Send passphrase back to system"
@ -280,14 +280,20 @@ msgid ""
msgstr "允许应用程序阻止系统响应笔记本上盖开关事件需要认证。" msgstr "允许应用程序阻止系统响应笔记本上盖开关事件需要认证。"
#: src/login/org.freedesktop.login1.policy:117 #: src/login/org.freedesktop.login1.policy:117
#, fuzzy
#| msgid "Allow applications to inhibit system handling of the power key"
msgid "Allow applications to inhibit system handling of the reboot key" msgid "Allow applications to inhibit system handling of the reboot key"
msgstr "允许应用程序阻止系统响应重启键" msgstr "允许应用程序阻止系统响应电源键"
#: src/login/org.freedesktop.login1.policy:118 #: src/login/org.freedesktop.login1.policy:118
#, fuzzy
#| msgid ""
#| "Authentication is required for an application to inhibit system handling "
#| "of the power key."
msgid "" msgid ""
"Authentication is required for an application to inhibit system handling of " "Authentication is required for an application to inhibit system handling of "
"the reboot key." "the reboot key."
msgstr "允许应用程序阻止系统响应重启键需要认证。" msgstr "允许应用程序阻止系统响应电源键需要认证。"
#: src/login/org.freedesktop.login1.policy:128 #: src/login/org.freedesktop.login1.policy:128
msgid "Allow non-logged-in user to run programs" msgid "Allow non-logged-in user to run programs"
@ -406,7 +412,7 @@ msgstr "当存在应用程序阻止时仍然停止系统"
msgid "" msgid ""
"Authentication is required to halt the system while an application is " "Authentication is required to halt the system while an application is "
"inhibiting this." "inhibiting this."
msgstr "当应用程序阻止停止系统需要认证。" msgstr "当应用程序阻止停止系统需要认证。"
#: src/login/org.freedesktop.login1.policy:268 #: src/login/org.freedesktop.login1.policy:268
msgid "Suspend the system" msgid "Suspend the system"

View File

@ -94,8 +94,6 @@ KERNEL=="udmabuf", GROUP="kvm"
SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK += "ptp_kvm" SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK += "ptp_kvm"
SUBSYSTEM=="ptp", ATTR{clock_name}=="hyperv", SYMLINK += "ptp_hyperv"
SUBSYSTEM=="dmi", ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="", ENV{ID_VENDOR}="$attr{sys_vendor}", ENV{ID_MODEL}="$attr{product_name}" SUBSYSTEM=="dmi", ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="", ENV{ID_VENDOR}="$attr{sys_vendor}", ENV{ID_MODEL}="$attr{product_name}"
SUBSYSTEM=="dmi", ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="product_version", ENV{ID_VENDOR}="$attr{sys_vendor}", ENV{ID_MODEL}="$attr{product_version}" SUBSYSTEM=="dmi", ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="product_version", ENV{ID_VENDOR}="$attr{sys_vendor}", ENV{ID_MODEL}="$attr{product_version}"

View File

@ -76,7 +76,7 @@ static const char *const log_facility_unshifted_table[LOG_NFACILITIES] = {
[LOG_FAC(LOG_LOCAL4)] = "local4", [LOG_FAC(LOG_LOCAL4)] = "local4",
[LOG_FAC(LOG_LOCAL5)] = "local5", [LOG_FAC(LOG_LOCAL5)] = "local5",
[LOG_FAC(LOG_LOCAL6)] = "local6", [LOG_FAC(LOG_LOCAL6)] = "local6",
[LOG_FAC(LOG_LOCAL7)] = "local7", [LOG_FAC(LOG_LOCAL7)] = "local7"
}; };
DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(log_facility_unshifted, int, LOG_FAC(~0)); DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(log_facility_unshifted, int, LOG_FAC(~0));
@ -93,7 +93,7 @@ static const char *const log_level_table[] = {
[LOG_WARNING] = "warning", [LOG_WARNING] = "warning",
[LOG_NOTICE] = "notice", [LOG_NOTICE] = "notice",
[LOG_INFO] = "info", [LOG_INFO] = "info",
[LOG_DEBUG] = "debug", [LOG_DEBUG] = "debug"
}; };
DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(log_level, int, LOG_DEBUG); DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(log_level, int, LOG_DEBUG);

View File

@ -446,12 +446,12 @@ static int fixup_input(
return std_input; return std_input;
} }
static int fixup_output(ExecOutput output, int socket_fd) { static int fixup_output(ExecOutput std_output, int socket_fd) {
if (output == EXEC_OUTPUT_SOCKET && socket_fd < 0) if (std_output == EXEC_OUTPUT_SOCKET && socket_fd < 0)
return EXEC_OUTPUT_INHERIT; return EXEC_OUTPUT_INHERIT;
return output; return std_output;
} }
static int setup_input( static int setup_input(
@ -666,8 +666,7 @@ static int setup_output(
case EXEC_OUTPUT_JOURNAL_AND_CONSOLE: case EXEC_OUTPUT_JOURNAL_AND_CONSOLE:
r = connect_logger_as(unit, context, params, o, ident, fileno, uid, gid); r = connect_logger_as(unit, context, params, o, ident, fileno, uid, gid);
if (r < 0) { if (r < 0) {
log_unit_warning_errno(unit, r, "Failed to connect %s to the journal socket, ignoring: %m", log_unit_warning_errno(unit, r, "Failed to connect %s to the journal socket, ignoring: %m", fileno == STDOUT_FILENO ? "stdout" : "stderr");
fileno == STDOUT_FILENO ? "stdout" : "stderr");
r = open_null_as(O_WRONLY, fileno); r = open_null_as(O_WRONLY, fileno);
} else { } else {
struct stat st; struct stat st;

View File

@ -24,7 +24,7 @@
#CrashShell=no #CrashShell=no
#CrashReboot=no #CrashReboot=no
#CtrlAltDelBurstAction=reboot-force #CtrlAltDelBurstAction=reboot-force
#CPUAffinity= #CPUAffinity=1 2
#NUMAPolicy=default #NUMAPolicy=default
#NUMAMask= #NUMAMask=
#RuntimeWatchdogSec=0 #RuntimeWatchdogSec=0

View File

@ -47,8 +47,7 @@ static void test_socket_address_parse(void) {
const int default_family = socket_ipv6_is_supported() ? AF_INET6 : AF_INET; const int default_family = socket_ipv6_is_supported() ? AF_INET6 : AF_INET;
test_socket_address_parse_one("65535", 0, default_family, test_socket_address_parse_one("65535", 0, default_family, "[::]:65535");
default_family == AF_INET6 ? "[::]:65535": "0.0.0.0:65535");
/* The checks below will pass even if ipv6 is disabled in /* The checks below will pass even if ipv6 is disabled in
* kernel. The underlying glibc's inet_pton() is just a string * kernel. The underlying glibc's inet_pton() is just a string
@ -66,8 +65,7 @@ static void test_socket_address_parse(void) {
test_socket_address_parse_one("[::1]%lo%lo:1234", -EINVAL, 0, NULL); test_socket_address_parse_one("[::1]%lo%lo:1234", -EINVAL, 0, NULL);
test_socket_address_parse_one("[::1]% lo:1234", -EINVAL, 0, NULL); test_socket_address_parse_one("[::1]% lo:1234", -EINVAL, 0, NULL);
test_socket_address_parse_one("8888", 0, default_family, test_socket_address_parse_one("8888", 0, default_family, "[::]:8888");
default_family == AF_INET6 ? "[::]:8888": "0.0.0.0:8888");
test_socket_address_parse_one("[2001:0db8:0000:85a3:0000:0000:ac1f:8001]:8888", 0, AF_INET6, test_socket_address_parse_one("[2001:0db8:0000:85a3:0000:0000:ac1f:8001]:8888", 0, AF_INET6,
"[2001:db8:0:85a3::ac1f:8001]:8888"); "[2001:db8:0:85a3::ac1f:8001]:8888");
test_socket_address_parse_one("[::1]:8888", 0, AF_INET6, NULL); test_socket_address_parse_one("[::1]:8888", 0, AF_INET6, NULL);

View File

@ -1,2 +0,0 @@
Skip this test due to issue #17469
https://github.com/systemd/systemd/issues/17469