pid1: add GracefulOptions= setting to .mount units

This new setting can be used to specify mount options that shall only be
added to the mount option string if the kernel supports them.

This shall be used for adding "usrquota" to tmp.mount without breaking compat,
but is generally be useful.
This commit is contained in:
Lennart Poettering
2025-01-15 21:05:06 +01:00
parent f8214e2cca
commit 09fbff57fc
10 changed files with 161 additions and 9 deletions
+16
View File
@@ -650,6 +650,22 @@
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>GracefulOptions=</varname></term>
<listitem><para>Additional mount options that shall be appended to <varname>Options=</varname> if
supported by the kernel. This may be used to configure mount options that are optional and only
enabled on kernels that support them. Note that this is supported only for native kernel mount
options (i.e. explicitly not for mount options implemented in userspace, such as those processed by
<command>/usr/bin/mount</command> itself, by FUSE or by mount helpers such as
<command>mount.nfs</command>).</para>
<para>May be specified multiple times. If specified multiple times, all listed, supported mount
options are combined. If an empty string is assigned, the list is reset.</para>
<xi:include href="version-info.xml" xpointer="v258"/></listitem>
</varlistentry>
</variablelist>
<xi:include href="systemd.service.xml" xpointer="shared-unit-options" />