Merge pull request #7629 from poettering/condition-kernel-version
core,udev,networkd: add ConditionKernelVersion=
This commit is contained in:
@@ -172,6 +172,17 @@
|
||||
for details.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>KernelVersion=</varname></term>
|
||||
<listitem>
|
||||
<para>Checks whether the kernel version (as reported by <command>uname -r</command>) matches a certain
|
||||
expression (or if prefixed with the exclamation mark does not match it). See
|
||||
<literal>ConditionKernelVersion=</literal> in
|
||||
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
|
||||
details.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>Architecture=</varname></term>
|
||||
<listitem>
|
||||
|
||||
@@ -232,6 +232,16 @@
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>KernelVersion=</varname></term>
|
||||
<listitem>
|
||||
<para>Checks whether the kernel version (as reported by <command>uname -r</command>) matches a certain
|
||||
expression (or if prefixed with the exclamation mark does not match it). See
|
||||
<literal>ConditionKernelVersion=</literal> in
|
||||
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> for details.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>Architecture=</varname></term>
|
||||
<listitem>
|
||||
|
||||
@@ -193,6 +193,17 @@
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>KernelVersion=</varname></term>
|
||||
<listitem>
|
||||
<para>Checks whether the kernel version (as reported by <command>uname -r</command>) matches a certain
|
||||
expression (or if prefixed with the exclamation mark does not match it). See
|
||||
<literal>ConditionKernelVersion=</literal> in
|
||||
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
|
||||
details.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>Architecture=</varname></term>
|
||||
<listitem>
|
||||
|
||||
@@ -923,6 +923,7 @@
|
||||
<term><varname>ConditionVirtualization=</varname></term>
|
||||
<term><varname>ConditionHost=</varname></term>
|
||||
<term><varname>ConditionKernelCommandLine=</varname></term>
|
||||
<term><varname>ConditionKernelVersion=</varname></term>
|
||||
<term><varname>ConditionSecurity=</varname></term>
|
||||
<term><varname>ConditionCapability=</varname></term>
|
||||
<term><varname>ConditionACPower=</varname></term>
|
||||
@@ -1050,6 +1051,17 @@
|
||||
the exact assignment is looked for with right and left hand
|
||||
side matching.</para>
|
||||
|
||||
<para><varname>ConditionKernelVersion=</varname> may be used to check whether the kernel version (as reported
|
||||
by <command>uname -r</command>) matches a certain expression (or if prefixed with the exclamation mark does not
|
||||
match it). The argument must be a single string. If the string starts with one of <literal><</literal>,
|
||||
<literal><=</literal>, <literal>=</literal>, <literal>>=</literal>, <literal>></literal> a relative
|
||||
version comparison is done, otherwise the specified string is matched with shell-style globs.</para>
|
||||
|
||||
<para>Note that using the kernel version string is an unreliable way to determine which features are supported
|
||||
by a kernel, because of the widespread practice of backporting drivers, features, and fixes from newer upstream
|
||||
kernels into older versions provided by distributions. Hence, this check is inherently unportable and should
|
||||
not be used for units which may be used on different distributions.</para>
|
||||
|
||||
<para><varname>ConditionSecurity=</varname> may be used to
|
||||
check whether the given security module is enabled on the
|
||||
system. Currently, the recognized values are
|
||||
@@ -1201,6 +1213,7 @@
|
||||
<term><varname>AssertVirtualization=</varname></term>
|
||||
<term><varname>AssertHost=</varname></term>
|
||||
<term><varname>AssertKernelCommandLine=</varname></term>
|
||||
<term><varname>AssertKernelVersion=</varname></term>
|
||||
<term><varname>AssertSecurity=</varname></term>
|
||||
<term><varname>AssertCapability=</varname></term>
|
||||
<term><varname>AssertACPower=</varname></term>
|
||||
|
||||
Reference in New Issue
Block a user