condition: allow fnmatch() matches in ConditionKernelVersion=

This is mostly to make things systematic, and brings no new
functionality, as not specifying any operator is identical to prefixing
with =$ anyway.
This commit is contained in:
Lennart Poettering
2022-09-01 23:16:13 +02:00
parent 4803b0bcaa
commit c990742523
2 changed files with 27 additions and 27 deletions
+5 -5
View File
@@ -1334,11 +1334,11 @@
<listitem><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 list of (potentially quoted)
expressions. For each of the expressions, if it starts with one of <literal>&lt;</literal>,
<literal>&lt;=</literal>, <literal>=</literal> (or <literal>==</literal>), <literal>!=</literal>
(or <literal>&lt;&gt;</literal>), <literal>&gt;=</literal>, <literal>&gt;</literal> a relative
version comparison is done, otherwise the specified string is matched with shell-style
globs.</para>
expressions. Each expression starts with one of <literal>&lt;</literal>, <literal>&lt;=</literal>,
<literal>=</literal> (or <literal>==</literal>), <literal>!=</literal> (or
<literal>&lt;&gt;</literal>), <literal>&gt;=</literal>, <literal>&gt;</literal> for a relative
version comparison, or <literal>=$</literal>, <literal>!=$</literal> for a shell-style glob
match. If no operator is specified <literal>=$</literal> is implied.</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