Update upstream source from tag 'upstream/247.9'

Update to upstream version '247.9'
with Debian dir f23376d060
This commit is contained in:
Michael Biebl 2021-08-15 15:33:32 +02:00
commit cdc181bd12
330 changed files with 3379 additions and 2449 deletions

View File

@ -50,6 +50,7 @@ BuildPackages=
python
python-lxml
qrencode
rsync
xz
zstd

View File

@ -69,6 +69,7 @@ Packages=
libapparmor1
libcrypt1
libcryptsetup12
libgcrypt20
libkmod2
liblz4-1
libmount1

5
NEWS
View File

@ -1454,6 +1454,11 @@ CHANGES WITH 245:
for the [RoutingPolicyRule] section of .network files to configure
source routing based on UID ranges and prefix length, respectively.
* The Type= match property of .link files has been generalized to
always match the device type shown by 'networkctl status', even for
devices where udev does not set DEVTYPE=. This allows e.g. Type=ether
to be used.
* sd-bus gained a new API call sd_bus_message_sensitive() that marks a
D-Bus message object as "sensitive". Those objects are erased from
memory when they are freed. This concept is intended to be used for

4
README
View File

@ -14,7 +14,7 @@ MAILING LIST:
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
IRC:
#systemd on irc.freenode.org
#systemd on irc.libera.chat
BUG REPORTS:
https://github.com/systemd/systemd/issues
@ -81,7 +81,7 @@ REQUIREMENTS:
Optional but strongly recommended:
CONFIG_IPV6
CONFIG_AUTOFS4_FS
CONFIG_AUTOFS_FS
CONFIG_TMPFS_XATTR
CONFIG_{TMPFS,EXT4_FS,XFS,BTRFS_FS,...}_POSIX_ACL
CONFIG_SECCOMP

View File

@ -34,6 +34,6 @@ Please see our [Contribution Guidelines](docs/CONTRIBUTING.md) for more informat
When preparing patches for systemd, please follow our [Coding Style Guidelines](docs/CODING_STYLE.md).
If you are looking for support, please contact our [mailing list](https://lists.freedesktop.org/mailman/listinfo/systemd-devel) or join our [IRC channel](irc://irc.freenode.org/%23systemd).
If you are looking for support, please contact our [mailing list](https://lists.freedesktop.org/mailman/listinfo/systemd-devel) or join our [IRC channel](irc://irc.libera.chat/%23systemd).
Stable branches with backported patches are available in the [stable repo](https://github.com/systemd/systemd-stable).

View File

@ -30,5 +30,4 @@ foreach file : in_files
endforeach
meson.add_install_script('sh', '-c',
'test -n "$DESTDIR" || @0@/journalctl --update-catalog'
.format(rootbindir))
'test -n "$DESTDIR" || @0@/journalctl --update-catalog'.format(rootbindir))

View File

@ -130,7 +130,7 @@ names for them in UIs.
discovered Windows installation might have the identifier `auto-windows` or
`auto-windows-10` or so.).
4. Similar, boot menu entries referring to Apple MacOS X installations should
4. Similar, boot menu entries referring to Apple macOS installations should
use the identifier `osx` or one that is prefixed with `osx-`. If such an
entry is automatically discovered by the boot loader use `auto-osx` as
identifier, or `auto-osx-` as prefix for the identifier, see above.

View File

@ -208,7 +208,7 @@ On EFI, any such images shall be added to the list of valid boot entries.
Note that these configurations snippets do not need to be the only configuration source for a boot loader. It may extend this list of entries with additional items from other configuration files (for example its own native configuration files) or automatically detected other entries without explicit configuration.
To make this explicitly clear: this specification is designed with "free" operating systems in mind, starting Windows or MacOS is out of focus with these configuration snippets, use boot-loader specific solutions for that. In the text above, if we say "OS" we hence imply "free", i.e. primarily Linux (though this could be easily be extended to the BSDs and whatnot).
To make this explicitly clear: this specification is designed with "free" operating systems in mind, starting Windows or macOS is out of focus with these configuration snippets, use boot-loader specific solutions for that. In the text above, if we say "OS" we hence imply "free", i.e. primarily Linux (though this could be easily be extended to the BSDs and whatnot).
Note that all paths used in the configuration snippets use a Unix-style "/" as path separator. This needs to be converted to an EFI-style "\" separator in EFI boot loaders.

View File

@ -13,7 +13,7 @@ account sufficient pam_unix.so
account required pam_permit.so
-password sufficient pam_systemd_home.so
password sufficient pam_unix.so sha512 shadow try_first_pass try_authtok
password sufficient pam_unix.so sha512 shadow try_first_pass use_authtok
password required pam_deny.so
-session optional pam_keyinit.so revoke

11
hwdb.d/README Normal file
View File

@ -0,0 +1,11 @@
Files in this directory specify a description of hardware devices, in the form
of mappings from modalias-like keys (which identify specific hardware devices)
to udev properties.
Files in this directory are not read by udev directly. Instead,
man:systemd-hwdb(8) compiles them into a binary database.
See man:hwdb(7) for an overview of the configuration file format, and
man:systemd-udevd.service(8) for a description of the udev daemon.
Use 'systemd-analyze cat-config udev/hwdb.d' to display the effective config.

View File

@ -4,6 +4,7 @@
# they are very long but quite repetitive and the parser is not very fast.
# So we don't "test" them.
hwdb_files_notest = files('''
README
20-pci-vendor-model.hwdb
20-pci-classes.hwdb
20-usb-vendor-model.hwdb
@ -47,8 +48,7 @@ if conf.get('ENABLE_HWDB') == 1
mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
meson.add_install_script('sh', '-c',
'test -n "$DESTDIR" || @0@/systemd-hwdb update'
.format(rootbindir))
'test -n "$DESTDIR" || @0@/systemd-hwdb update'.format(rootbindir))
endif
if want_tests != 'false'

View File

@ -35,7 +35,7 @@
<citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
a handler for core dumps invoked by the kernel. Whether <command>systemd-coredump</command> is used
is determined by the kernel's
<varname>kernel.core_pattern</varname> <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
<varname>kernel.core_pattern</varname> <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
setting. See
<citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>
and
@ -86,7 +86,9 @@
<listitem><para>The maximum size in bytes of a core
which will be processed. Core dumps exceeding this size
may be stored, but the backtrace will not be generated.
</para>
Like other sizes in this same config file, the usual
suffixes to the base of 1024 are allowed (B, K, M,
G, T, P, and E.)</para>
<para>Setting <varname>Storage=none</varname> and <varname>ProcessSizeMax=0</varname>
disables all coredump handling except for a log entry.</para>
@ -98,15 +100,18 @@
<term><varname>JournalSizeMax=</varname></term>
<listitem><para>The maximum (uncompressed) size in bytes of a
core to be saved.</para></listitem>
core to be saved. Unit suffixes are allowed just as in
<option>ProcessSizeMax=</option></para></listitem>.
</varlistentry>
<varlistentry>
<term><varname>MaxUse=</varname></term>
<term><varname>KeepFree=</varname></term>
<listitem><para>Enforce limits on the disk space taken up by
externally stored core dumps. <option>MaxUse=</option> makes
<listitem><para>Enforce limits on the disk space, specified
in bytes, taken up by externally stored core dumps.
Unit suffixes are allowed just as in <option>ProcessSizeMax=</option>.
<option>MaxUse=</option> makes
sure that old core dumps are removed as soon as the total disk
space taken up by core dumps grows beyond this limit (defaults
to 10% of the total disk size). <option>KeepFree=</option>

View File

@ -70,7 +70,7 @@ foreach tuple : xsltproc.found() ? manpages : []
link = custom_target(
htmlalias,
output : htmlalias,
command : ['ln', '-fs', html, '@OUTPUT@'])
command : [ln, '-fs', html, '@OUTPUT@'])
if want_html
dst = join_paths(docdir, 'html', htmlalias)
cmd = 'ln -fs @0@ $DESTDIR@1@'.format(html, dst)
@ -148,7 +148,7 @@ foreach tuple : xsltproc.found() ? [['systemd.directives', '7', systemd_directiv
htmlalias,
input : p2,
output : htmlalias,
command : ['ln', '-fs', html, '@OUTPUT@'])
command : [ln, '-fs', html, '@OUTPUT@'])
if want_html
dst = join_paths(docdir, 'html', htmlalias)
cmd = 'ln -fs @0@ $DESTDIR@1@'.format(html, dst)
@ -176,25 +176,27 @@ man = custom_target(
'man',
output : 'man',
depends : man_pages,
command : ['echo'])
command : [echo])
html = custom_target(
'html',
output : 'html',
depends : html_pages,
command : ['echo'])
command : [echo])
run_target(
'doc-sync',
depends : man_pages + html_pages,
command : ['rsync', '-rlv',
'--delete-excluded',
'--include=man',
'--include=*.html',
'--exclude=*',
'--omit-dir-times',
meson.current_build_dir(),
get_option('www-target')])
if rsync.found()
run_target(
'doc-sync',
depends : man_pages + html_pages,
command : [rsync, '-rlv',
'--delete-excluded',
'--include=man',
'--include=*.html',
'--exclude=*',
'--omit-dir-times',
meson.current_build_dir(),
get_option('www-target')])
endif
############################################################

View File

@ -318,7 +318,8 @@ account sufficient pam_unix.so
account required pam_permit.so
-password sufficient pam_systemd_home.so
password sufficient pam_unix.so sha512 shadow try_first_pass try_authtok
password sufficient pam_unix.so sha512 shadow try_first_pass use_authtok
password required pam_deny.so
-session optional pam_keyinit.so revoke

View File

@ -139,7 +139,7 @@ account sufficient pam_unix.so
account required pam_permit.so
<command>-password sufficient pam_systemd_home.so</command>
password sufficient pam_unix.so sha512 shadow try_first_pass try_authtok
password sufficient pam_unix.so sha512 shadow try_first_pass use_authtok
password required pam_deny.so
-session optional pam_keyinit.so revoke

View File

@ -204,7 +204,7 @@
<listitem><para>Specifies the network interface to execute the query on. This may either be specified as numeric
interface index or as network interface string (e.g. <literal>en0</literal>). Note that this option has no
effect if system-wide DNS configuration (as configured in <filename>/etc/resolv.conf</filename> or
<filename>/etc/systemd/resolve.conf</filename>) in place of per-link configuration is used.</para></listitem>
<filename>/etc/systemd/resolved.conf</filename>) in place of per-link configuration is used.</para></listitem>
</varlistentry>
<varlistentry>

View File

@ -65,8 +65,8 @@
union type:</para>
<programlisting>typedef union sd_id128 {
uint8_t bytes[16];
uint64_t qwords[2];
uint8_t bytes[16];
uint64_t qwords[2];
} sd_id128_t;</programlisting>
<para>This union type allows accessing the 128-bit ID as 16
@ -95,7 +95,7 @@
#define SD_MESSAGE_COREDUMP_STR SD_ID128_MAKE_STR(fc,2e,22,bc,6e,e6,47,b6,b9,07,29,ab,34,a2,50,b1)
int main(int argc, char **argv) {
puts("Match for coredumps: MESSAGE_ID=" SD_MESSAGE_COREDUMP_STR);
puts("Match for coredumps: MESSAGE_ID=" SD_MESSAGE_COREDUMP_STR);
}
</programlisting>
@ -104,7 +104,7 @@ int main(int argc, char **argv) {
following example code will output the string
"fc2e22bc6ee647b6b90729ab34a250b1":</para>
<programlisting>int main(int argc, char *argv[]) {
puts("Match for coredumps: %s", SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
puts("Match for coredumps: %s", SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
}</programlisting>
<para><constant>SD_ID128_FORMAT_STR</constant> and <function>SD_ID128_FORMAT_VAL()</function> may
@ -113,10 +113,10 @@ int main(int argc, char **argv) {
format string, as shown in the following example:</para>
<programlisting>int main(int argc, char *argv[]) {
sd_id128_t id;
id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id));
return 0;
sd_id128_t id;
id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id));
return 0;
}</programlisting>
<para><constant>SD_ID128_UUID_FORMAT_STR</constant> is similar to
@ -127,20 +127,20 @@ int main(int argc, char **argv) {
<para>Use <function>sd_id128_equal()</function> to compare two 128-bit IDs:</para>
<programlisting>int main(int argc, char *argv[]) {
sd_id128_t a, b, c;
a = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a;
assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b));
return 0;
sd_id128_t a, b, c;
a = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a;
assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b));
return 0;
}</programlisting>
<para>Use <function>sd_id128_is_null()</function> to check if an 128bit ID consists of only
<constant>NUL</constant> bytes:</para>
<programlisting>int main(int argc, char *argv[]) {
assert(sd_id128_is_null(SD_ID128_NULL));
assert(sd_id128_is_null(SD_ID128_NULL));
}</programlisting>
<para>Note that new, randomized IDs may be generated with

View File

@ -115,7 +115,7 @@
__attribute__((cleanup(sd_login_monitor_unrefp))) sd_login_monitor *m = NULL;
int r;
r = sd_login_monitor_default(&amp;m);
r = sd_login_monitor_new(NULL, &amp;m);
if (r &lt; 0)
fprintf(stderr, "Failed to allocate login monitor object: %s\n", strerror(-r));

View File

@ -41,33 +41,31 @@
<refsection id='main-conf'>
<title>Configuration Directories and Precedence</title>
<para>The default configuration is defined during compilation, so a
configuration file is only needed when it is necessary to deviate
from those defaults. By default, the configuration file in
<filename>/etc/systemd/</filename> contains commented out entries
showing the defaults as a guide to the administrator. This file
can be edited to create local overrides.
</para>
<para>The default configuration is set during compilation, so configuration is only needed when it is
necessary to deviate from those defaults. Initially, the main configuration file in
<filename>/etc/systemd/</filename> contains commented out entries showing the defaults as a guide to the
administrator. Local overrides can be created by editing this file or by creating drop-ins, as described
below. Using drop-ins for local configuration is recommended over modifications to the main configuration
file.</para>
<para>When packages need to customize the configuration, they can install configuration snippets in
<filename>/usr/lib/systemd/*.conf.d/</filename> or <filename>/usr/local/lib/systemd/*.conf.d/</filename>.
The main configuration file is read before any of the configuration directories, and has the lowest
precedence; entries in a file in any configuration directory override entries in the single configuration
file. Files in the <filename>*.conf.d/</filename> configuration subdirectories are sorted by their
filename in lexicographic order, regardless of in which of the subdirectories they reside. When multiple
files specify the same option, for options which accept just a single value, the entry in the file with
the lexicographically latest name takes precedence. For options which accept a list of values, entries
are collected as they occur in files sorted lexicographically.</para>
<para>In addition to the "main" configuration file, drop-in configuration snippets are read from
<filename>/usr/lib/systemd/*.conf.d/</filename>, <filename>/usr/local/lib/systemd/*.conf.d/</filename>,
and <filename>/etc/systemd/*.conf.d/</filename>. Those drop-ins have higher precedence and override the
main configuration file. Files in the <filename>*.conf.d/</filename> configuration subdirectories are
sorted by their filename in lexicographic order, regardless of in which of the subdirectories they
reside. When multiple files specify the same option, for options which accept just a single value, the
entry in the file sorted last takes precedence, and for options which accept a list of values, entries
are collected as they occur in the sorted files.</para>
<para>Files in <filename>/etc/</filename> are reserved for the local administrator, who may use this
logic to override the configuration files installed by vendor packages. It is recommended to prefix all
filenames in those subdirectories with a two-digit number and a dash, to simplify the ordering of the
files.</para>
<para>When packages need to customize the configuration, they can install drop-ins under
<filename>/usr/</filename>. Files in <filename>/etc/</filename> are reserved for the local administrator,
who may use this logic to override the configuration files installed by vendor packages. Drop-ins have to
be used to override package drop-ins, since the main configuration file has lower precedence. It is
recommended to prefix all filenames in those subdirectories with a two-digit number and a dash, to
simplify the ordering of the files.</para>
<para>To disable a configuration file supplied by the vendor, the
recommended way is to place a symlink to
<filename>/dev/null</filename> in the configuration directory in
<filename>/etc/</filename>, with the same filename as the vendor
configuration file.</para>
<para>To disable a configuration file supplied by the vendor, the recommended way is to place a symlink
to <filename>/dev/null</filename> in the configuration directory in <filename>/etc/</filename>, with the
same filename as the vendor configuration file.</para>
</refsection>
</refsection>

View File

@ -51,7 +51,7 @@
<listitem><para>The Microsoft Windows EFI boot manager, if installed</para></listitem>
<listitem><para>The Apple MacOS X boot manager, if installed</para></listitem>
<listitem><para>The Apple macOS boot manager, if installed</para></listitem>
<listitem><para>The EFI Shell binary, if installed</para></listitem>
@ -193,7 +193,7 @@
<varlistentry>
<term><keycap>a</keycap></term>
<listitem><para>OS X</para></listitem>
<listitem><para>macOS</para></listitem>
</varlistentry>
<varlistentry>
@ -294,7 +294,7 @@
<title>EFI Variables</title>
<para>The following EFI variables are defined, set and read by <command>systemd-boot</command>, under the vendor
UUID <literal>4a67b082-0a4c-41cf-b6c7-440b29bb8c4</literal>, for communication between the OS and the boot
UUID <literal>4a67b082-0a4c-41cf-b6c7-440b29bb8c4f</literal>, for communication between the OS and the boot
loader:</para>
<variablelist class='efi-variables'>

View File

@ -34,7 +34,7 @@
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, and provides the implementation for
<citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
<command>pull-raw</command>, <command>pull-tar</command>, <command>import-raw</command>,
<command>import-tar</command>, <command>export-raw</command>, and <command>export-tar</command> commands.</para>
<command>import-tar</command>, <command>import-fs</command>, <command>export-raw</command>, and <command>export-tar</command> commands.</para>
<para>See
<citerefentry><refentrytitle>org.freedesktop.import1</refentrytitle><manvolnum>5</manvolnum></citerefentry>

View File

@ -48,10 +48,9 @@
<title>Setup Information</title>
<para>The system must be running systemd with a full unified cgroup hierarchy for the expected cgroups-v2 features.
Furthermore, resource accounting must be turned on for all units monitored by <command>systemd-oomd</command>.
The easiest way to turn on resource accounting is by ensuring the values for <varname>DefaultCPUAccounting</varname>,
<varname>DefaultIOAccounting</varname>, <varname>DefaultMemoryAccounting</varname>, and
<varname>DefaultTasksAccounting</varname> are set to <constant>true</constant> in
Furthermore, memory accounting must be turned on for all units monitored by <command>systemd-oomd</command>.
The easiest way to turn on memory accounting is by ensuring the value for <varname>DefaultMemoryAccounting=</varname>
is set to <constant>true</constant> in
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
<para>You will need a kernel compiled with PSI support. This is available in Linux 4.20 and above.</para>

View File

@ -88,8 +88,8 @@
<term><option>-e</option></term>
<term><option>--exec-delay=</option></term>
<listitem>
<para>Delay the execution of <varname>RUN</varname>
instructions by the given number of seconds. This option
<para>Delay the execution of each <varname>RUN{<replaceable>program</replaceable>}</varname>
parameter by the given number of seconds. This option
might be useful when debugging system crashes during
coldplug caused by loading non-working kernel
modules.</para>
@ -160,7 +160,7 @@
<term><varname>udev.exec_delay=</varname></term>
<term><varname>rd.udev.exec_delay=</varname></term>
<listitem>
<para>Delay the execution of <varname>RUN</varname> instructions by the given
<para>Delay the execution of each <varname>RUN{<replaceable>program</replaceable>}</varname> parameter by the given
number of seconds. This option might be useful when
debugging system crashes during coldplug caused by loading
non-working kernel modules.</para>

View File

@ -50,7 +50,7 @@
group records. Internally it talks to all other user/group record services running on the system in
parallel and forwards any information discovered. This simplifies clients substantially since they need
to talk to a single service only instead of all of them in
parallel. <constant>io.systemd.NameSeviceSwitch</constant> provides compatibility with classic UNIX/glibc
parallel. <constant>io.systemd.NameServiceSwitch</constant> provides compatibility with classic UNIX/glibc
NSS user records, i.e. converts <type>struct passwd</type> and <type>struct group</type> records as
acquired with APIs such as <citerefentry
project='man-pages'><refentrytitle>getpwnam</refentrytitle><manvolnum>1</manvolnum></citerefentry> to JSON

View File

@ -36,6 +36,53 @@
<para>At early boot and when the system manager configuration is reloaded kernel command line configuration for
integrity protected block devices is translated into <filename>systemd-veritysetup@.service</filename> units by
<citerefentry><refentrytitle>systemd-veritysetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
<para><filename>systemd-veritysetup@.service</filename> calls <command>systemd-veritysetup</command>.</para>
</refsect1>
<refsect1>
<title>Commands</title>
<para>The following commands are understood by <command>systemd-veritysetup</command>:</para>
<variablelist>
<varlistentry>
<term>
<option>attach</option>
<replaceable>volume</replaceable>
<replaceable>datadevice</replaceable>
<replaceable>hashdevice</replaceable>
<replaceable>roothash</replaceable>
[<replaceable>option</replaceable>...]
</term>
<listitem><para>Create a block device <replaceable>volume</replaceable> using
<replaceable>datadevice</replaceable> and <replaceable>hashdevice</replaceable> as the backing
devices. <replaceable>roothash</replaceable> forms the root of the tree of hashes stored on
<replaceable>hashdevice</replaceable>. See
<ulink url="https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/verity.html">
Kernel dm-verity</ulink> documentation for details.
</para></listitem>
</varlistentry>
<varlistentry>
<term>
<option>detach</option>
<replaceable>volume</replaceable>
</term>
<listitem><para>Detach (destroy) the block device
<replaceable>volume</replaceable>.</para></listitem>
</varlistentry>
<varlistentry>
<term>
<option>help</option>
</term>
<listitem><para>Print short information about command syntax.</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>

View File

@ -305,8 +305,11 @@
Filesystem</ulink>. It is generally recommended to run most system services with this option set to
<literal>invisible</literal>. This option is implemented via file system namespacing, and thus cannot
be used with services that shall be able to install mount points in the host file system
hierarchy. It also cannot be used for services that need to access metainformation about other users'
processes. This option implies <varname>MountAPIVFS=</varname>.</para>
hierarchy. Note that the root user is unaffected by this option, so to be effective it has to be used
together with <varname>User=</varname> or <varname>DynamicUser=yes</varname>, and also without the
<literal>CAP_SYS_PTRACE</literal> capability, which also allows a process to bypass this feature. It
cannot be used for services that need to access metainformation about other users' processes. This
option implies <varname>MountAPIVFS=</varname>.</para>
<para>If the kernel doesn't support per-mount point <option>hidepid=</option> mount options this
setting remains without effect, and the unit's processes will be able to access and see other process
@ -2373,7 +2376,9 @@ SystemCallErrorNumber=EPERM</programlisting>
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more
details about named file descriptors and their ordering.</para>
<para>This setting defaults to <option>null</option>.</para></listitem>
<para>This setting defaults to <option>null</option>, unless
<varname>StandardInputText=</varname>/<varname>StandardInputData=</varname> are set, in which case it
defaults to <option>data</option>.</para></listitem>
</varlistentry>
<varlistentry>
@ -2472,9 +2477,11 @@ SystemCallErrorNumber=EPERM</programlisting>
<term><varname>StandardInputText=</varname></term>
<term><varname>StandardInputData=</varname></term>
<listitem><para>Configures arbitrary textual or binary data to pass via file descriptor 0 (STDIN) to the
executed processes. These settings have no effect unless <varname>StandardInput=</varname> is set to
<option>data</option>. Use this option to embed process input data directly in the unit file.</para>
<listitem><para>Configures arbitrary textual or binary data to pass via file descriptor 0 (STDIN) to
the executed processes. These settings have no effect unless <varname>StandardInput=</varname> is set
to <option>data</option> (which is the default if <varname>StandardInput=</varname> is not set
otherwise, but <varname>StandardInputText=</varname>/<varname>StandardInputData=</varname> is). Use
this option to embed process input data directly in the unit file.</para>
<para><varname>StandardInputText=</varname> accepts arbitrary textual data. C-style escapes for special
characters as well as the usual <literal>%</literal>-specifiers are resolved. Each time this setting is used

View File

@ -47,12 +47,13 @@
<refsect1>
<title>Description</title>
<para>Generators are small executables that live in
<filename>&systemgeneratordir;/</filename> and other directories listed above.
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
will execute those binaries very early at bootup and at configuration reload time
— before unit files are loaded. Their main purpose is to convert configuration
that is not native into dynamically generated unit files.</para>
<para>Generators are small executables placed in <filename>&systemgeneratordir;/</filename> and other
directories listed above.
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> will execute
these binaries very early at bootup and at configuration reload time — before unit files are
loaded. Their main purpose is to convert configuration that is not native to the service manager into
dynamically generated unit files, symlinks or unit file drop-ins, so that they can extend the unit file
hierarchy the service manager subsequently loads and operates on.</para>
<para>Each generator is called with three directory paths that are to be used for
generator output. In these three directories, generators may dynamically generate
@ -155,17 +156,15 @@
</listitem>
<listitem>
<para>Generators are run very early at boot and cannot rely on any external
services. They may not talk to any other process. That includes simple things
such as logging to
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
or <command>systemd</command> itself (this means: no
<para>Generators are run very early at boot and cannot rely on any external services. They may not
talk to any other process. That includes simple things such as logging to <citerefentry
project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>, or
<command>systemd</command> itself (this means: no
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>)!
Non-essential file systems like <filename>/var/</filename> and
<filename>/home/</filename> are mounted after generators have run. Generators
can however rely on the most basic kernel functionality to be available,
including a mounted <filename>/sys/</filename>, <filename>/proc/</filename>,
<filename>/dev/</filename>, <filename>/usr/</filename>.
Non-essential file systems like <filename>/var/</filename> and <filename>/home/</filename> are
mounted after generators have run. Generators can however rely on the most basic kernel functionality
to be available, as well as mounted <filename>/sys/</filename>, <filename>/proc/</filename>,
<filename>/dev/</filename>, <filename>/usr/</filename> and <filename>/run/</filename> file systems.
</para>
</listitem>
@ -176,12 +175,18 @@
</listitem>
<listitem>
<para>Generators should only be used to generate unit files and symlinks to
them, not any other kind of configuration. Due to the lifecycle logic
mentioned above, generators are not a good fit to generate dynamic
configuration for other services. If you need to generate dynamic
configuration for other services, do so in normal services you order before
the service in question.</para>
<para>Generators should only be used to generate unit files, <filename>.d/*.conf</filename> drop-ins
for them and symlinks to them, not any other kind of non-unit related configuration. Due to the
lifecycle logic mentioned above, generators are not a good fit to generate dynamic configuration for
other services. If you need to generate dynamic configuration for other services, do so in normal
services you order before the service in question.</para>
<para>Note that using the <varname>StandardInputData=</varname>/<varname>StandardInputText=</varname>
settings of service unit files (see
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>), it
is possible to make arbitrary input data (including daemon-specific configuration) part of the unit
definitions, which often might be sufficient to embed data or configuration for other programs into
unit files in a native fashion.</para>
</listitem>
<listitem>

View File

@ -125,7 +125,10 @@
<term><varname>Type=</varname></term>
<listitem>
<para>A whitespace-separated list of shell-style globs matching the device type, as exposed by
<command>networkctl status</command>. If the list is prefixed with a "!", the test is inverted.
<command>networkctl list</command>. If the list is prefixed with a "!", the test is inverted.
Some valid values are <literal>ether</literal>, <literal>loopback</literal>, <literal>wlan</literal>, <literal>wwan</literal>.
Valid types are named either from the udev <literal>DEVTYPE</literal> attribute, or
<literal>ARPHRD_</literal> macros in <filename>linux/if_arp.h</filename>, so this is not comprehensive.
</para>
</listitem>
</varlistentry>

View File

@ -61,12 +61,6 @@
<filename>/etc/</filename> take precedence over those in <filename>/run/</filename> which in turn
take precedence over those in <filename>/usr/lib/</filename>. Drop-in files under any of these
directories take precedence over the main network file wherever located.</para>
<para>Note that an interface without any static IPv6 addresses configured, and neither DHCPv6
nor IPv6LL enabled, shall be considered to have no IPv6 support. IPv6 will be automatically
disabled for that interface by writing "1" to
<filename>/proc/sys/net/ipv6/conf/<replaceable>ifname</replaceable>/disable_ipv6</filename>.
</para>
</refsect1>
<refsect1>
@ -202,10 +196,10 @@
<varlistentry>
<term><varname>Group=</varname></term>
<listitem>
<para>Link groups are similar to port ranges found in managed switches.
When network interfaces are added to a numbered group, operations on
all the interfaces from that group can be performed at once. An unsigned
integer in the range 0—4294967294. Defaults to unset.</para>
<para>Link groups are similar to port ranges found in managed switches. When network interfaces
are added to a numbered group, operations on all the interfaces from that group can be
performed at once. Takes an unsigned integer in the range 0…4294967295. Defaults to unset.
</para>
</listitem>
</varlistentry>
<varlistentry>
@ -382,7 +376,7 @@
<listitem>
<para>Specifies how IPv6 link local address is generated. Takes one of <literal>eui64</literal>,
<literal>none</literal>, <literal>stable-privacy</literal> and <literal>random</literal>.
When unset, the kernel's default will be used. Note that if <varname>LinkLocalAdressing=</varname>
When unset, the kernel's default will be used. Note that if <varname>LinkLocalAddressing=</varname>
not configured as <literal>ipv6</literal> then <varname>IPv6LinkLocalAddressGenerationMode=</varname>
is ignored.</para>
</listitem>
@ -1500,9 +1494,7 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
<varlistentry>
<term><varname>UseDNS=</varname></term>
<listitem>
<para>When true (the default), the DNS servers received
from the DHCP server will be used and take precedence over
any statically configured ones.</para>
<para>When true (the default), the DNS servers received from the DHCP server will be used.</para>
<para>This corresponds to the <option>nameserver</option>
option in <citerefentry
@ -1521,8 +1513,7 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
<term><varname>UseNTP=</varname></term>
<listitem>
<para>When true (the default), the NTP servers received from the DHCP server will be used by
<filename>systemd-timesyncd.service</filename> and take precedence over any statically configured
ones.</para>
<filename>systemd-timesyncd.service</filename>.</para>
</listitem>
</varlistentry>
<varlistentry>
@ -1642,13 +1633,12 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
<term><varname>UseGateway=</varname></term>
<listitem>
<para>When true, the gateway will be requested from the DHCP server and added to the routing table with a
metric of 1024, and a scope of "link". When unset, the value specified with <option>UseRoutes=</option>
metric of 1024, and a scope of "link". When unset, the value specified with <option>UseRoutes=</option>
is used.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>UseTimezone=</varname></term>
<listitem><para>When true, the timezone received from the
DHCP server will be set as timezone of the local
system. Defaults to <literal>no</literal>.</para></listitem>
@ -2047,8 +2037,7 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
<varlistentry>
<term><varname>UseDNS=</varname></term>
<listitem>
<para>When true (the default), the DNS servers received in the Router Advertisement will be used and take
precedence over any statically configured ones.</para>
<para>When true (the default), the DNS servers received in the Router Advertisement will be used.</para>
<para>This corresponds to the <option>nameserver</option> option in <citerefentry
project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>

View File

@ -63,6 +63,25 @@
url="https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New
Control Group Interfaces</ulink> for an introduction on how to make
use of resource control APIs from programs.</para>
<refsect2>
<title>Setting resource controls for a group of related units</title>
<para>As described in
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, the
settings listed here may be set through the main file of a unit and drop-in snippets in
<filename index="false">*.d/</filename> directories. The list of directories searched for drop-ins
includes names formed by repeatedly truncating the unit name after all dashes. This is particularly
convenient to set resource limits for a group of units with similar names.</para>
<para>For example, every user gets their own slice
<filename>user-<replaceable>nnn</replaceable>.slice</filename>. Drop-ins with local configuration that
affect user 1000 may be placed in
<filename index="false">/etc/systemd/system/user-1000.slice</filename>,
<filename index="false">/etc/systemd/system/user-1000.slice.d/*.conf</filename>, but also
<filename index="false">/etc/systemd/system/user-.slice.d/*.conf</filename>. This last directory
applies to all user slices.</para>
</refsect2>
</refsect1>
<refsect1>

View File

@ -752,14 +752,19 @@
If set to <option>no</option> (the default), the service will
not be restarted. If set to <option>on-success</option>, it
will be restarted only when the service process exits cleanly.
In this context, a clean exit means an exit code of 0, or one
of the signals
<constant>SIGHUP</constant>,
<constant>SIGINT</constant>,
<constant>SIGTERM</constant> or
<constant>SIGPIPE</constant>, and
additionally, exit statuses and signals specified in
<varname>SuccessExitStatus=</varname>. If set to
In this context, a clean exit means any of the following:
<itemizedlist>
<listitem><simpara>exit code of 0;</simpara></listitem>
<listitem><simpara>for types other than
<varname>Type=oneshot</varname>, one of the signals
<constant>SIGHUP</constant>,
<constant>SIGINT</constant>,
<constant>SIGTERM</constant>, or
<constant>SIGPIPE</constant>;</simpara></listitem>
<listitem><simpara>exit statuses and signals specified in
<varname>SuccessExitStatus=</varname>.</simpara></listitem>
</itemizedlist>
If set to
<option>on-failure</option>, the service will be restarted
when the process exits with a non-zero exit code, is
terminated by a signal (including on core dump, but excluding
@ -881,7 +886,7 @@
<listitem><para>Takes a list of exit status definitions that, when returned by the main service
process, will be considered successful termination, in addition to the normal successful exit status
0 and the signals <constant>SIGHUP</constant>, <constant>SIGINT</constant>,
0 and, except for <varname>Type=oneshot</varname>, the signals <constant>SIGHUP</constant>, <constant>SIGINT</constant>,
<constant>SIGTERM</constant>, and <constant>SIGPIPE</constant>. Exit status definitions can be
numeric termination statuses, termination status names, or termination signal names, separated by
spaces. See the Process Exit Codes section in

View File

@ -1138,18 +1138,18 @@
<para><literal>gnome-session.target</literal> pulls in Nautilus as top-level service:</para>
<programlisting>[Unit]
Description=User systemd services for GNOME graphical session
Wants=nautilus.service
BindsTo=graphical-session.target</programlisting>
Description=User systemd services for GNOME graphical session
Wants=nautilus.service
BindsTo=graphical-session.target</programlisting>
<para><literal>nautilus.service</literal> gets stopped when the session stops:</para>
<programlisting>[Unit]
Description=Render the desktop icons with Nautilus
PartOf=graphical-session.target
Description=Render the desktop icons with Nautilus
PartOf=graphical-session.target
[Service]
</programlisting>
[Service]
</programlisting>
</example>
</listitem>
</varlistentry>

View File

@ -45,9 +45,9 @@
<filename>/run/systemd/transient/*</filename>
<filename>/run/systemd/generator.early/*</filename>
<filename>/etc/systemd/system/*</filename>
<filename>/etc/systemd/systemd.attached/*</filename>
<filename>/etc/systemd/system.attached/*</filename>
<filename>/run/systemd/system/*</filename>
<filename>/run/systemd/systemd.attached/*</filename>
<filename>/run/systemd/system.attached/*</filename>
<filename>/run/systemd/generator/*</filename>
<filename index='false'></filename>
<filename>/usr/lib/systemd/system/*</filename>
@ -163,7 +163,7 @@
section. When the unit is enabled, symlinks will be created for those names, and removed when the unit is
disabled. For example, <filename>reboot.target</filename> specifies
<varname>Alias=ctrl-alt-del.target</varname>, so when enabled, the symlink
<filename>/etc/systemd/systemd/ctrl-alt-del.service</filename> pointing to the
<filename>/etc/systemd/system/ctrl-alt-del.service</filename> pointing to the
<filename>reboot.target</filename> file will be created, and when
<keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>Del</keycap></keycombo> is invoked,
<command>systemd</command> will look for the <filename>ctrl-alt-del.service</filename> and execute
@ -190,8 +190,8 @@
headers. For instantiated units, this logic will first look for the instance <literal>.d/</literal> subdirectory
(e.g. <literal>foo@bar.service.d/</literal>) and read its <literal>.conf</literal> files, followed by the template
<literal>.d/</literal> subdirectory (e.g. <literal>foo@.service.d/</literal>) and the <literal>.conf</literal>
files there. Moreover for units names containing dashes (<literal>-</literal>), the set of directories generated by
truncating the unit name after all dashes is searched too. Specifically, for a unit name
files there. Moreover for unit names containing dashes (<literal>-</literal>), the set of directories generated by
repeatedly truncating the unit name after all dashes is searched too. Specifically, for a unit name
<filename>foo-bar-baz.service</filename> not only the regular drop-in directory
<filename>foo-bar-baz.service.d/</filename> is searched but also both <filename>foo-bar-.service.d/</filename> and
<filename>foo-.service.d/</filename>. This is useful for defining common drop-ins for a set of related units, whose
@ -1063,28 +1063,32 @@
<refsect2>
<title>Conditions and Asserts</title>
<para>Unit files may also include a number of <varname index="false">Condition…=</varname> and
<varname index="false">Assert…=</varname> settings. Before the unit is started, systemd will verify
that the specified conditions are true. If not, the starting of the unit will be (mostly silently)
skipped. Failing conditions will not result in the unit being moved into the <literal>failed</literal>
state. The conditions are checked at the time the queued start job is to be executed. The ordering
dependencies are still respected, so other units are still pulled in and ordered as if this unit was
successfully activated. Use condition expressions in order to skip units that do not apply to the local
system, for example because the kernel or runtime environment doesn't require their functionality.
<para>Unit files may also include a number of <varname index="false">Condition…=</varname> and <varname
index="false">Assert…=</varname> settings. Before the unit is started, systemd will verify that the
specified conditions and asserts are true. If not, the starting of the unit will be (mostly silently)
skipped (in case of conditions), or aborted with an error message (in case of asserts). Failing
conditions or asserts will not result in the unit being moved into the <literal>failed</literal>
state. The conditions and asserts are checked at the time the queued start job is to be executed. The
ordering dependencies are still respected, so other units are still pulled in and ordered as if this
unit was successfully activated, and the conditions and asserts are executed the precise moment the
unit would normally start and thus can validate system state after the units ordered before completed
initialization. Use condition expressions for skipping units that do not apply to the local system, for
example because the kernel or runtime environment doesn't require their functionality.
</para>
<para>If multiple conditions are specified, the unit will be executed if all of them apply (i.e. a
logical AND is applied). Condition checks can use a pipe symbol (<literal>|</literal>) after the equals
sign (<literal>Condition…=|…</literal>), which causes the condition becomes a triggering condition. If
at least one triggering condition is defined for a unit, then the unit will be executed if at least one
of the triggering conditions apply and all of the non-triggering conditions. If you prefix an argument
with the pipe symbol and an exclamation mark, the pipe symbol must be passed first, the exclamation
second. If any of these options is assigned the empty string, the list of conditions is reset
completely, all previous condition settings (of any kind) will have no effect.</para>
sign (<literal>Condition…=|…</literal>), which causes the condition to become a
<emphasis>triggering</emphasis> condition. If at least one triggering condition is defined for a unit,
then the unit will be started if at least one of the triggering conditions of the unit applies and all
of the regular (i.e. non-triggering) conditions apply. If you prefix an argument with the pipe symbol
and an exclamation mark, the pipe symbol must be passed first, the exclamation second. If any of these
options is assigned the empty string, the list of conditions is reset completely, all previous
condition settings (of any kind) will have no effect.</para>
<para>The <varname>AssertArchitecture=</varname>, <varname>AssertVirtualization=</varname>, … options
provide a similar mechanism that causes the job to fail (instead of being skipped). The failed check is
logged. Units with failed conditions are considered to be in a clean state and will be garbage
are similar to conditions but cause the start job to fail (instead of being skipped). The failed check
is logged. Units with failed conditions are considered to be in a clean state and will be garbage
collected if they are not referenced. This means that when queried, the condition failure may or may
not show up in the state of the unit.</para>

View File

@ -609,6 +609,24 @@
<refsect1>
<title>Environment</title>
<para>The environment block for the system manager is initially set by the kernel. (In particular,
<literal>key=value</literal> assignments on the kernel command line are returned into environment
variables for PID 1). For the user manager, the system manager sets the environment as described in the
"Environment Variables in Spawned Processes" section of
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. The
<varname>DefaultEnvironment=</varname> setting in the system manager applies to all services including
<filename>user@.service</filename>. Additional entries may be configured (as for any other service)
through the <varname>Environment=</varname> and <varname>EnvironmentFile=</varname> settings for
<filename>user@.service</filename> (see
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>). Also,
additional environment variables may be set through the <varname>ManagerEnvironment=</varname> setting in
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
and
<citerefentry><refentrytitle>systemd-user.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
<para>Some of the variables understood by <command>systemd</command>:</para>
<variablelist class='environment-variables'>
<varlistentry>
<term><varname>$SYSTEMD_LOG_COLOR</varname></term>
@ -1090,12 +1108,11 @@
only the options described below are understood. Nevertheless, <command>systemd</command> is usually
started in this mode through the
<citerefentry><refentrytitle>user@.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
service, which is shared between all users, and it may be more convenient to use configuration files to
service, which is shared between all users. It may be more convenient to use configuration files to
modify settings (see
<citerefentry><refentrytitle>systemd-user.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
or a drop-in that specifies one of the environment variables listed above in the Environment section
(see the discussion of <varname>Environment=</varname> and <varname>EnvironmentFile=</varname> in
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para>
or environment variables. See the "Environment" section above for a discussion of how the environment
block is set.</para>
<variablelist>
<varlistentry>

View File

@ -58,8 +58,8 @@ c+ /dev/char-device-to-[re]create mode user group - major
b /dev/block-device-to-create mode user group - major:minor
b+ /dev/block-device-to-[re]create mode user group - major:minor
C /target/to/create - - - - /source/to/copy
x /path-or-glob/to/ignore - - - - -
X /path-or-glob/to/ignore/recursively - - - - -
x /path-or-glob/to/ignore/recursively - - - - -
X /path-or-glob/to/ignore - - - - -
r /empty/dir/to/remove - - - - -
R /dir/to/remove/recursively - - - - -
z /path-or-glob/to/adjust/mode mode user group - -

View File

@ -63,8 +63,8 @@
<term><varname>exec_delay=</varname></term>
<listitem>
<para>An integer. Delay the execution of <varname>RUN</varname>
instructions by the given number of seconds. This option
<para>An integer. Delay the execution of each <varname>RUN{<replaceable>program</replaceable>}</varname>
parameter by the given number of seconds. This option
might be useful when debugging system crashes during
coldplug caused by loading non-working kernel
modules.</para>

View File

@ -125,7 +125,7 @@
<title>Values</title>
<para>Values are written as double quoted strings, such as ("string").
To include a quotation mark (") in the value, precede it by a backslash (\").
Any other occurrences of a character followed by a backslash are not further unescaped.
Any other occurrences of a backslash followed by a character are not unescaped.
That is, "\t\n" is treated as four characters:
backslash, lowercase t, backslash, lowercase n.</para>
@ -459,7 +459,7 @@
<para>Specify a program to be executed after processing of all the rules for the event. With
<literal>+=</literal>, this invocation is added to the list, and with <literal>=</literal> or
<literal>:=</literal>, it replaces any previous contents of the list. Please note that both
<literal>program</literal> and <literal>builtin</literal> types described below use a single
<literal>program</literal> and <literal>builtin</literal> types described below share a common
list, so clearing the list with <literal>:=</literal> and <literal>=</literal> affects both
types.</para>

View File

@ -286,7 +286,7 @@
</varlistentry>
<varlistentry>
<term><option>-g</option></term>
<term><option>--tag-match=<replaceable>PROPERTY</replaceable></option></term>
<term><option>--tag-match=<replaceable>TAG</replaceable></option></term>
<listitem>
<para>Trigger events for devices with a matching tag. When this option is specified multiple times,
then each matching result is ANDed, that is, devices which have all specified tags are triggered.</para>

View File

@ -215,7 +215,7 @@
</varlistentry>
<varlistentry>
<term><constant>io.systemd.NameSeviceSwitch</constant></term>
<term><constant>io.systemd.NameServiceSwitch</constant></term>
<listitem><para>This service is (also) provided by
<citerefentry><refentrytitle>systemd-userdbd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
@ -232,7 +232,7 @@
<para>Note that <command>userdbctl</command> has internal support for NSS-based lookups too. This means
that if neither <constant>io.systemd.Multiplexer</constant> nor
<constant>io.systemd.NameSeviceSwitch</constant> are running look-ups into the basic user/group
<constant>io.systemd.NameServiceSwitch</constant> are running look-ups into the basic user/group
databases will still work.</para>
</refsect1>

View File

@ -564,17 +564,22 @@ version_h = vcs_tag(
versiondep = declare_dependency(sources: version_h)
sh = find_program('sh')
echo = find_program('echo')
test = find_program('test')
sed = find_program('sed')
awk = find_program('awk')
m4 = find_program('m4')
stat = find_program('stat')
ln = find_program('ln')
git = find_program('git', required : false)
env = find_program('env')
perl = find_program('perl', required : false)
rsync = find_program('rsync', required : false)
meson_make_symlink = project_source_root + '/tools/meson-make-symlink.sh'
mkdir_p = 'mkdir -p $DESTDIR/@0@'
test_efi_create_disk_sh = find_program('test/test-efi-create-disk.sh')
mkdir_p = 'mkdir -p $DESTDIR/@0@'
splash_bmp = files('test/splash.bmp')
# if -Dxxx-path option is found, use that. Otherwise, check in $PATH,
@ -608,7 +613,7 @@ endforeach
conf.set_quoted('TELINIT', get_option('telinit-path'))
if run_command('ln', '--relative', '--help').returncode() != 0
if run_command(ln, '--relative', '--help').returncode() != 0
error('ln does not support --relative (added in coreutils 8.16)')
endif
@ -622,7 +627,7 @@ const char * in_word_set(const char *, @0@);
@1@
'''
gperf_snippet_format = 'echo foo,bar | @0@ -L ANSI-C'
gperf_snippet = run_command('sh', '-c', gperf_snippet_format.format(gperf.path()))
gperf_snippet = run_command(sh, '-c', gperf_snippet_format.format(gperf.path()))
gperf_test = gperf_test_format.format('size_t', gperf_snippet.stdout())
if cc.compiles(gperf_test)
gperf_len_type = 'size_t'
@ -684,11 +689,11 @@ conf.set_quoted('DEFAULT_NET_NAMING_SCHEME', default_net_naming_scheme)
time_epoch = get_option('time-epoch')
if time_epoch == -1
time_epoch = run_command('sh', ['-c', 'echo "$SOURCE_DATE_EPOCH"']).stdout().strip()
time_epoch = run_command(sh, '-c', 'echo "$SOURCE_DATE_EPOCH"').stdout().strip()
if time_epoch == '' and git.found() and run_command('test', '-e', '.git').returncode() == 0
# If we're in a git repository, use the creation time of the latest git tag.
latest_tag = run_command('git', 'describe', '--abbrev=0', '--tags').stdout().strip()
time_epoch = run_command('git', 'log', '-1', '--format=%at', latest_tag).stdout()
latest_tag = run_command(git, 'describe', '--abbrev=0', '--tags').stdout().strip()
time_epoch = run_command(git, 'log', '--no-show-signature', '-1', '--format=%at', latest_tag).stdout()
endif
if time_epoch == ''
NEWS = files('NEWS')
@ -775,7 +780,7 @@ if not meson.is_cross_build()
id = id_result.stdout().to_int()
if id != 65534
warning('\n' +
'The local group with the configured group name "@0@" of the nobody group does not have UID 65534 (it has @1@).\n'.format(nobody_group, id) +
'The local group with the configured group name "@0@" of the nobody group does not have GID 65534 (it has @1@).\n'.format(nobody_group, id) +
'Your build will result in an group table setup that is incompatible with the local system.')
endif
endif
@ -3333,7 +3338,7 @@ executable(
custom_target(
'systemd-runtest.env',
output : 'systemd-runtest.env',
command : ['sh', '-c', '{ ' +
command : [sh, '-c', '{ ' +
'echo SYSTEMD_TEST_DATA=@0@; '.format(join_paths(project_source_root, 'test')) +
'echo SYSTEMD_CATALOG_DIR=@0@; '.format(join_paths(project_build_root, 'catalog')) +
'} >@OUTPUT@'],
@ -3502,7 +3507,8 @@ if install_sysconfdir
install_data('xorg/50-systemd-user.sh',
install_dir : xinitrcdir)
endif
install_data('modprobe.d/systemd.conf',
install_data('README',
'modprobe.d/systemd.conf',
install_dir : modprobedir)
install_data('LICENSE.GPL2',
'LICENSE.LGPL2.1',
@ -3567,7 +3573,7 @@ foreach tuple : sanitizers
name,
output : name,
depends : build,
command : [env, 'ln', '-fs',
command : [ln, '-fs',
join_paths(build.full_path(), b),
'@OUTPUT@'],
build_by_default : true)
@ -3619,16 +3625,16 @@ endif
if git.found()
git_head = run_command(
git,
['--git-dir=@0@/.git'.format(project_source_root),
'rev-parse', 'HEAD']).stdout().strip()
'--git-dir=@0@/.git'.format(project_source_root),
'rev-parse', 'HEAD').stdout().strip()
git_head_short = run_command(
git,
['--git-dir=@0@/.git'.format(project_source_root),
'rev-parse', '--short=7', 'HEAD']).stdout().strip()
'--git-dir=@0@/.git'.format(project_source_root),
'rev-parse', '--short=7', 'HEAD').stdout().strip()
run_target(
'git-snapshot',
command : ['git', 'archive',
command : [git, 'archive',
'-o', '@0@/systemd-@1@.tar.gz'.format(project_source_root,
git_head_short),
'--prefix', 'systemd-@0@/'.format(git_head),

7
modprobe.d/README Normal file
View File

@ -0,0 +1,7 @@
Files in this directory contain configuration for modprobe, a program to load
kernel modules.
See man:modprobe.d(5) for explanation of the configuration file format, and
man:modprobe(8) for a description of the program itself.
Use 'systemd-analyze cat-config modprobe.d' to display the effective config.

View File

@ -1,5 +1,5 @@
[Match]
Type=wifi
Type=wlan
WLANInterfaceType=ad-hoc
[Network]

View File

@ -1,5 +1,5 @@
[Match]
Type=wifi
Type=wlan
WLANInterfaceType=ap
[Network]

View File

@ -1,5 +1,5 @@
[Match]
Type=wifi
Type=wlan
WLANInterfaceType=station
[Network]

View File

@ -10,9 +10,8 @@ SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-
SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc"
SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb", GOTO="default_hwdb_imported"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}"
LABEL="default_hwdb_imported"
ACTION!="add", GOTO="default_end"

View File

@ -35,8 +35,8 @@ SUBSYSTEMS=="usb", ENV{ID_BUS}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", A
SUBSYSTEMS=="pci|usb|platform|acpi", IMPORT{builtin}="path_id"
ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{.INPUT_CLASS}"
ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{.INPUT_CLASS}"
# allow empty class for platform and usb devices; platform supports only a single interface that way
SUBSYSTEMS=="usb|platform", ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", \
# allow empty class for platform, usb and i2c devices; platform supports only a single interface that way
SUBSYSTEMS=="usb|platform|i2c", ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", \
SYMLINK+="input/by-path/$env{ID_PATH}-event"
LABEL="persistent_input_end"

View File

@ -6,7 +6,7 @@
ACTION=="remove", GOTO="persistent_storage_end"
ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end"
SUBSYSTEM!="block", GOTO="persistent_storage_end"
SUBSYSTEM!="block|ubi", GOTO="persistent_storage_end"
KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*", GOTO="persistent_storage_end"
# ignore partitions that span the entire disk
@ -81,9 +81,6 @@ KERNEL=="mmcblk[0-9]", SUBSYSTEMS=="mmc", ATTRS{name}=="?*", ENV{ID_NAME}="$attr
KERNEL=="mmcblk[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}"
KERNEL=="mmcblk[0-9]p[0-9]*", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n"
# UBI-MTD
SUBSYSTEM=="ubi", KERNEL=="ubi*_*", ATTRS{mtd_num}=="*", SYMLINK+="ubi_mtd%s{mtd_num}_%s{name}"
# Memstick
KERNEL=="msblk[0-9]|mspblk[0-9]", SUBSYSTEMS=="memstick", ATTRS{name}=="?*", ATTRS{serial}=="?*", \
ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}"
@ -110,7 +107,7 @@ KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DAT
IMPORT{builtin}="blkid --noraid"
# probe filesystem metadata of disks
KERNEL!="sr*", IMPORT{builtin}="blkid"
KERNEL!="sr*|mmcblk[0-9]boot[0-9]", IMPORT{builtin}="blkid"
# by-label/by-uuid links (filesystem metadata)
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"

View File

@ -4,9 +4,8 @@ ACTION=="remove", GOTO="serial_end"
SUBSYSTEM!="tty", GOTO="serial_end"
SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}"
# We already ran the hwdb builtin for devices with MODALIAS in 50-default.rules.
# Let's cover the remaining case here, where we walk up the tree to find a node with $MODALIAS.
ENV{MODALIAS}=="", SUBSYSTEMS=="pci", IMPORT{builtin}="hwdb --subsystem=pci"
SUBSYSTEMS=="pci", IMPORT{builtin}="hwdb --subsystem=pci"
SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
# /dev/serial/by-path/, /dev/serial/by-id/ for USB devices
KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="serial_end"

View File

@ -2,7 +2,7 @@
ACTION!="add", GOTO="drivers_end"
ENV{MODALIAS}=="?*", RUN{builtin}+="kmod load $env{MODALIAS}"
ENV{MODALIAS}=="?*", RUN{builtin}+="kmod load '$env{MODALIAS}'"
SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}+="kmod load tifm_sd"
SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}+="kmod load tifm_ms"
SUBSYSTEM=="memstick", RUN{builtin}+="kmod load ms_block mspro_block"

8
rules.d/README Normal file
View File

@ -0,0 +1,8 @@
Files in this directory contain configuration for systemd-udev.service, a
daemon that manages symlinks to device nodes, permissions of devices nodes,
emits device events for userspace, and renames network interfaces.
See man:udev(7) for an overview of the configuration file format, and
man:systemd-udevd.service(8) for a description of service itself.
Use 'systemd-analyze cat-config udev/rules.d' to display the effective config.

View File

@ -1,5 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
install_data(
'README',
install_dir : udevrulesdir)
rules = files('''
60-autosuspend.rules
60-block.rules

View File

@ -69,7 +69,7 @@ _bootctl() {
fi
done
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}
elif __contains_word "$verb" ${VERBS[STANDALONE]}; then
comps=''

View File

@ -140,7 +140,7 @@ _busctl() {
n=$(($COMP_CWORD - $i))
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}
elif __contains_word "$verb" ${VERBS[STANDALONE]}; then
comps=''

View File

@ -80,7 +80,7 @@ _coredumpctl() {
fi
done
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}
elif __contains_word "$verb" ${VERBS[LIST]} ${VERBS[DUMP]}; then
comps=''

View File

@ -170,7 +170,7 @@ _homectl() {
fi
done
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}
elif __contains_word "$verb" ${VERBS[NAME]}; then
comps=$(__get_homes)

View File

@ -50,7 +50,7 @@ _hostnamectl() {
fi
done
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}
elif __contains_word "$verb" ${VERBS[CHASSIS]}; then
comps='desktop laptop convertible server tablet handset watch embedded vm container'

View File

@ -67,7 +67,7 @@ _localectl() {
fi
done
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}
elif __contains_word "$verb" ${VERBS[VARIANTS]}; then
comps=$(command localectl list-x11-keymap-layouts)

View File

@ -93,7 +93,7 @@ _loginctl () {
fi
done
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps="${VERBS[*]}"
elif __contains_word "$verb" ${VERBS[SESSIONS]}; then

View File

@ -30,7 +30,7 @@ __get_machines() {
}
_machinectl() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword
local i verb comps
local -A OPTS=(
@ -95,7 +95,7 @@ _machinectl() {
return 0
fi
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}
elif __contains_word "$verb" ${VERBS[STANDALONE]}; then

View File

@ -30,7 +30,7 @@ __get_links() {
_networkctl() {
local i verb comps
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword
local -A OPTS=(
[STANDALONE]='-a --all -h --help --version --no-pager --no-legend -s --stats -l --full'
[ARG]='-n --lines'
@ -56,7 +56,7 @@ _networkctl() {
return 0
fi
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}
elif __contains_word "$verb" ${VERBS[STANDALONE]}; then
comps=''

View File

@ -79,7 +79,7 @@ _portablectl() {
n=$(($COMP_CWORD - $i))
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}
elif __contains_word "$verb" ${VERBS[STANDALONE]}; then
comps=''

View File

@ -87,7 +87,7 @@ _resolvectl() {
fi
done
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps="${VERBS[*]}"
elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[DOMAIN]}; then

View File

@ -249,7 +249,7 @@ _systemctl () {
cur_orig="$(printf '%q' $cur)"
fi
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps="${VERBS[*]}"
elif __contains_word "$verb" ${VERBS[ALL_UNITS]}; then

View File

@ -46,7 +46,7 @@ __get_syscall_sets() {
_systemd_analyze() {
local i verb comps mode
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword
local -A OPTS=(
[STANDALONE]='-h --help --version --system --user --global --order --require --no-pager
@ -93,12 +93,12 @@ _systemd_analyze() {
return 0
fi
if [[ -z $verb && $cur = -* ]]; then
if [[ -z ${verb-} && $cur = -* ]]; then
COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
return 0
fi
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}
elif __contains_word "$verb" ${VERBS[STANDALONE]}; then

View File

@ -25,7 +25,7 @@ __contains_word() {
}
_systemd_cat() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword
local i verb comps
local -A OPTS=(

View File

@ -37,7 +37,7 @@ __get_units_have_cgroup() {
}
_systemd_cgls() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword
local i verb comps
local -A OPTS=(

View File

@ -29,7 +29,7 @@ __get_machines() {
}
_systemd_cgtop() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword
local comps
local -A OPTS=(

View File

@ -24,7 +24,7 @@ __contains_word() {
}
_systemd-delta() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword
local comps
local -A OPTS=(
@ -48,12 +48,12 @@ _systemd-delta() {
return 0
fi
if [[ "$cur" = -* ]]; then
if [[ "$cur" = -* ]] || [[ -z ${comps-} ]]; then
COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
return 0
fi
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
COMPREPLY=( $(compgen -W '${comps-}' -- "$cur") )
return 0
}

View File

@ -24,7 +24,7 @@ __contains_word() {
}
_systemd_detect_virt() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword
local i verb comps
local -A OPTS=(

View File

@ -26,7 +26,7 @@ __contains_word () {
_systemd_id128() {
local i verb comps
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword
local -A OPTS=(
[STANDALONE]='-h --help --version -p --pretty'
[ARG]='-a --app-specific'
@ -61,7 +61,7 @@ _systemd_id128() {
fi
done
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}
elif __contains_word "$verb" ${VERBS[STANDALONE]}; then
comps=''

View File

@ -58,7 +58,7 @@ __get_rlimit() {
}
_systemd_nspawn() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword
local i verb comps
local -A OPTS=(

View File

@ -30,7 +30,7 @@ __get_names() {
_systemd_path() {
local comps
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword
local -A OPTS=(
[STANDALONE]='-h --help --version'
[ARG]='--suffix'

View File

@ -71,7 +71,7 @@ _systemd-resolve() {
return 0
fi
if [[ "$cur" = -* ]]; then
if [[ "$cur" = -* ]] || [[ -z ${comps-} ]]; then
COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
return 0
fi

View File

@ -31,20 +31,20 @@ __get_machines() {
_systemd_run() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local OPTS='-h --help --version --user --system --scope --unit --description --slice
-r --remain-after-exit --send-sighup -H --host -M --machine --service-type
--on-active --on-boot --on-startup --on-unit-active --on-unit-inactive
--on-calendar --timer-property --path-property --socket-property -t --pty
-q --quiet --no-block --uid --gid --nice -E --setenv -p --property
--no-ask-password --wait -P --pipe -G --collect --working-directory
-d --same-dir -S --shell'
local OPTS='--no-ask-password --scope -u --unit -p --property --description --slice --slice-inherit
-r --remain-after-exit --send-sighup --service-type --uid --gid --nice
--working-directory -d --same-dir -E --setenv -t --pty -P --pipe -S --shell -q --quiet
--on-active --on-boot --on-startup --on-unit-active --on-unit-inactive --on-calendar
--on-clock-change --on-timezone-change --path-property --socket-property
--timer-property --no-block --wait -G --collect --user --system -H --host -M --machine
-h --help --version'
local mode=--system
local i
local opts_with_values=(
--unit --description --slice --service-type -H --host -M --machine -p --property --on-active
--on-boot --on-startup --on-unit-active --on-unit-inactive --on-calendar --timer-property
--path-property --socket-property --uid --gid --nice -E --setenv --working-directory
--unit -p --property --slice --description --service-type --uid --gid --nice --working-directory
-E --setenv --on-active --on-boot --on-startup --on-unit-active --on-unit-inactive --on-calendar
--path-property --socket-property --timer-property -H --host -M --machine
)
for (( i=1; i <= COMP_CWORD; i++ )); do
if [[ ${COMP_WORDS[i]} != -* ]]; then

View File

@ -76,7 +76,7 @@ _timedatectl() {
fi
done
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}
elif __contains_word "$verb" ${VERBS[BOOLEAN]}; then
comps='true false'

View File

@ -73,7 +73,7 @@ _udevadm() {
fi
done
if [[ -z $verb ]]; then
if [[ -z ${verb-} ]]; then
if [[ "$cur" = -* ]]; then
COMPREPLY=( $(compgen -W '${OPTS[COMMON]} ${OPTS[DEBUG]}' -- "$cur") )
else

View File

@ -1,4 +1,4 @@
#compdef bootctl -*- shell-script -*-
#compdef bootctl
# SPDX-License-Identifier: LGPL-2.1-or-later
__bootctl() {

View File

@ -1,4 +1,4 @@
#compdef busctl -*- shell-script -*-
#compdef busctl
# SPDX-License-Identifier: LGPL-2.1-or-later
# busctl(1) completion -*- shell-script -*-

View File

@ -1,4 +1,4 @@
#compdef coredumpctl -*- shell-script -*-
#compdef coredumpctl
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_coredumpctl_commands] )) ||

View File

@ -1,4 +1,4 @@
#compdef hostnamectl -*- shell-script -*-
#compdef hostnamectl
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_hostnamectl_set-hostname] )) ||

View File

@ -1,4 +1,4 @@
#compdef journalctl -*- shell-script -*-
#compdef journalctl
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_journalctl_fields] )) ||

View File

@ -1,4 +1,4 @@
#compdef kernel-install -*- shell-script -*-
#compdef kernel-install
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_kernel-install_images] )) ||

View File

@ -1,4 +1,4 @@
#compdef localectl -*- shell-script -*-
#compdef localectl
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_localectl_set-locale] )) ||
@ -39,7 +39,7 @@ _localectl_set-x11-keymap() {
local -a _file _layout _model _variant _options
local _xorg_lst
_xorg_lst=${"$($commands[pkg-config] xkeyboard-config --variable=xkb_base)"}
_file=( ${(ps:\n\!:)"$(<$_xorg_lst/rules/xorg.lst)"} )
_file=( ${(ps:\n\!:)"$(<$_xorg_lst/rules/base.lst)"} )
_layout=( ${${${(M)${(f)_file[2]}:# *}# }%% *} )
_model=( ${${${(M)${(f)_file[1]}:# *}# }%% *} )
_variant=( ${${${(M)${(f)_file[3]}:# *}# }%% *} )

View File

@ -1,4 +1,4 @@
#compdef loginctl -*- shell-script -*-
#compdef loginctl
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_loginctl_all_sessions] )) ||

View File

@ -1,4 +1,4 @@
#compdef machinectl -*- shell-script -*-
#compdef machinectl
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[__machinectl_get_machines] )) ||

View File

@ -1,4 +1,4 @@
#compdef networkctl -*- shell-script -*-
#compdef networkctl
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_networkctl_commands] )) ||

View File

@ -1,4 +1,4 @@
#compdef resolvectl systemd-resolve -*- shell-script -*-
#compdef resolvectl systemd-resolve
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.

View File

@ -1,4 +1,4 @@
#compdef systemctl -*- shell-script -*-
#compdef systemctl
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_systemctl_commands] )) || _systemctl_commands()
@ -468,7 +468,7 @@ _arguments -s \
'--system[Connect to system manager]' \
'--user[Connect to user service manager]' \
"--no-wall[Don't send wall message before halt/power-off/reboot]" \
'--global[Enable/disable/mask unit files globally]' \
'--global[Enable/disable/mask default user unit files globally]' \
"--no-reload[When enabling/disabling unit files, don't reload daemon configuration]" \
'--no-ask-password[Do not ask for system passwords]' \
'--kill-who=[Who to send signal to]:killwho:(main control all)' \

View File

@ -1,4 +1,4 @@
#compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop systemd-detect-virt systemd-machine-id-setup systemd-notify systemd-tty-ask-password-agent -*- shell-script -*-
#compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop systemd-detect-virt systemd-machine-id-setup systemd-notify systemd-tty-ask-password-agent
# SPDX-License-Identifier: LGPL-2.1-or-later
local curcontext="$curcontext" state lstate line

View File

@ -1,4 +1,4 @@
#compdef systemd-analyze -*- shell-script -*-
#compdef systemd-analyze
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_systemd-analyze_log-level] )) ||

View File

@ -1,4 +1,4 @@
#compdef systemd-delta -*- shell-script -*-
#compdef systemd-delta
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_systemd-delta_types] )) ||

View File

@ -1,4 +1,4 @@
#compdef systemd-inhibit -*- shell-script -*-
#compdef systemd-inhibit
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_systemd-inhibit_commands] )) ||

View File

@ -1,4 +1,4 @@
#compdef systemd-nspawn -*- shell-script -*-
#compdef systemd-nspawn
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_systemd-nspawn_caps] )) ||

View File

@ -1,4 +1,4 @@
#compdef systemd-run -*- shell-script -*-
#compdef systemd-run
# SPDX-License-Identifier: LGPL-2.1-or-later
# @todo _systemctl has a helper with the same name, so we must redefine
@ -23,13 +23,25 @@ __systemctl() {
}
_arguments \
{-G,--collect}'[Unload the transient unit after it completed]' \
'--description=[Description for unit]:description' \
'--gid=[Run as system group]:group:_groups' \
{-h,--help}'[Show help message]' \
'--version[Show package version]' \
'--user[Run as user unit]' \
{-H+,--host=}'[Operate on remote host]:[user@]host:_sd_hosts_or_user_at_host' \
{-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \
'--scope[Run this as scope rather than service]' \
'--unit=[Run under the specified unit name]:unit name' \
'--nice=[Nice level]:nice level' \
'--no-ask-password[Do not query the user for authentication]' \
'--no-block[Do not synchronously wait for the unit start operation to finish]' \
'--on-active=[Run after SEC seconds]:SEC' \
'--on-boot=[Run SEC seconds after machine was booted up]:SEC' \
'--on-calendar=[Realtime timer]:SPEC' \
'--on-clock-change[Defines a trigger based on system clock jumps]' \
'--on-startup=[Run SEC seconds after systemd was first started]:SEC' \
'--on-timezone-change[Defines a trigger based on system timezone changes]' \
'--on-unit-active=[Run SEC seconds after the last activation]:SEC' \
'--on-unit-inactive=[Run SEC seconds after the last deactivation]:SEC' \
'--path-property=[Set path unit property]:NAME=VALUE' \
{-P,--pipe}'[Inherit standard input, output, and error]' \
{-p+,--property=}'[Set unit property]:NAME=VALUE:(( \
CPUAccounting= MemoryAccounting= BlockIOAccounting= SendSIGHUP= \
SendSIGKILL= MemoryLimit= CPUShares= BlockIOWeight= User= Group= \
@ -45,21 +57,25 @@ _arguments \
ReadOnlyPaths= InaccessiblePaths= EnvironmentFile= \
ProtectSystem= ProtectHome= RuntimeDirectory= PassEnvironment= \
))' \
'--description=[Description for unit]:description' \
'--slice=[Run in the specified slice]:slices:__systemd-run_slices' \
{-t,--pty}'[The service connects to the terminal]' \
{-q,--quiet}'[Suppresses additional informational output]' \
{-r,--remain-after-exit}'[Leave service around until explicitly stopped]' \
{-d,--same-dir}'[Run on the current working directory]' \
'--scope[Run this as scope rather than service]' \
'--send-sighup[Send SIGHUP when terminating]' \
'--service-type=[Service type]:type:(simple forking oneshot dbus notify idle)' \
'--uid=[Run as system user]:user:_users' \
'--gid=[Run as system group]:group:_groups' \
'--nice=[Nice level]:nice level' \
'--setenv=[Set environment]:NAME=VALUE' \
'--on-active=[Run after SEC seconds]:SEC' \
'--on-boot=[Run SEC seconds after machine was booted up]:SEC' \
'--on-startup=[Run SEC seconds after systemd was first started]:SEC' \
'--on-unit-active=[Run SEC seconds after the last activation]:SEC' \
'--on-unit-inactive=[Run SEC seconds after the last deactivation]:SEC' \
'--on-calendar=[Realtime timer]:SPEC' \
{-E+,--setenv=}'[Set environment]:NAME=VALUE' \
{-S,--shell}'[requests an interactive shell in the current working directory]' \
'--slice=[Run in the specified slice]:slices:__systemd-run_slices' \
'--slice-inherit[Run in the inherited slice]' \
'--socket-property=[Set socket unit property]:NAME=VALUE' \
'--system[Run as system unit]' \
'--timer-property=[Set timer unit property]:NAME=VALUE' \
'--uid=[Run as system user]:user:_users' \
{-u+,--unit=}'[Run under the specified unit name]:unit name' \
'--user[Run as user unit]' \
'--version[Show package version]' \
'--wait=[Wait until service stopped again]' \
'*::command:_command'
'--working-directory=[Run with the specified working directory]' \
'(-):command: _command_names -e' \
'*::arguments:_normal'

View File

@ -1,4 +1,4 @@
#compdef systemd-tmpfiles -*- shell-script -*-
#compdef systemd-tmpfiles
# SPDX-License-Identifier: LGPL-2.1-or-later
_arguments \

View File

@ -1,4 +1,4 @@
#compdef timedatectl -*- shell-script -*-
#compdef timedatectl
# SPDX-License-Identifier: LGPL-2.1-or-later
_timedatectl_set-timezone(){

View File

@ -1,4 +1,4 @@
#compdef udevadm -*- shell-script -*-
#compdef udevadm
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_udevadm_info] )) ||

View File

@ -1545,7 +1545,7 @@ static int assess(const struct security_info *info, Table *overview_table, Analy
if (a->default_dependencies_only && !info->default_dependencies) {
badness = UINT64_MAX;
d = strdup("Service runs in special boot phase, option does not apply");
d = strdup("Service runs in special boot phase, option is not appropriate");
if (!d)
return log_oom();
} else {

View File

@ -68,7 +68,7 @@ int get_block_device(const char *path, dev_t *ret) {
/* Gets the block device directly backing a file system. If the block device is encrypted, returns
* the device mapper block device. */
fd = open(path, O_NOFOLLOW|O_CLOEXEC);
fd = open(path, O_RDONLY|O_NOFOLLOW|O_CLOEXEC);
if (fd < 0)
return -errno;
@ -94,7 +94,8 @@ int block_get_originating(dev_t dt, dev_t *ret) {
_cleanup_closedir_ DIR *d = NULL;
_cleanup_free_ char *t = NULL;
char p[SYS_BLOCK_PATH_MAX("/slaves")];
struct dirent *de, *found = NULL;
_cleanup_free_ char *first_found = NULL;
struct dirent *de;
const char *q;
dev_t devt;
int r;
@ -115,20 +116,22 @@ int block_get_originating(dev_t dt, dev_t *ret) {
if (!IN_SET(de->d_type, DT_LNK, DT_UNKNOWN))
continue;
if (found) {
if (first_found) {
_cleanup_free_ char *u = NULL, *v = NULL, *a = NULL, *b = NULL;
/* We found a device backed by multiple other devices. We don't really support automatic
* discovery on such setups, with the exception of dm-verity partitions. In this case there are
* two backing devices: the data partition and the hash partition. We are fine with such
* setups, however, only if both partitions are on the same physical device. Hence, let's
* verify this. */
/* We found a device backed by multiple other devices. We don't really support
* automatic discovery on such setups, with the exception of dm-verity partitions. In
* this case there are two backing devices: the data partition and the hash
* partition. We are fine with such setups, however, only if both partitions are on
* the same physical device. Hence, let's verify this by iterating over every node
* in the 'slaves/' directory and comparing them with the first that gets returned by
* readdir(), to ensure they all point to the same device. */
u = path_join(p, de->d_name, "../dev");
if (!u)
return -ENOMEM;
v = path_join(p, found->d_name, "../dev");
v = path_join(p, first_found, "../dev");
if (!v)
return -ENOMEM;
@ -144,15 +147,17 @@ int block_get_originating(dev_t dt, dev_t *ret) {
* different physical devices, and we don't support that. */
if (!streq(a, b))
return -ENOTUNIQ;
} else {
first_found = strdup(de->d_name);
if (!first_found)
return -ENOMEM;
}
found = de;
}
if (!found)
if (!first_found)
return -ENOENT;
q = strjoina(p, "/", found->d_name, "/dev");
q = strjoina(p, "/", first_found, "/dev");
r = read_one_line_file(q, &t);
if (r < 0)

View File

@ -2022,8 +2022,14 @@ int cg_unified_cached(bool flush) {
unified_cache = CGROUP_UNIFIED_SYSTEMD;
unified_systemd_v232 = false;
} else {
if (statfs("/sys/fs/cgroup/systemd/", &fs) < 0)
if (statfs("/sys/fs/cgroup/systemd/", &fs) < 0) {
if (errno == ENOENT) {
/* Some other software may have set up /sys/fs/cgroup in a configuration we do not recognize. */
log_debug_errno(errno, "Unsupported cgroupsv1 setup detected: name=systemd hierarchy not found.");
return -ENOMEDIUM;
}
return log_debug_errno(errno, "statfs(\"/sys/fs/cgroup/systemd\" failed: %m");
}
if (F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) {
log_debug("Found cgroup2 on /sys/fs/cgroup/systemd, unified hierarchy for systemd controller (v232 variant)");

Some files were not shown because too many files have changed in this diff Show More