diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-06-28 10:58:06 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-06-29 17:11:03 +0200 |
commit | 910c6d09311ff41ee6f913ff4881f4d8059c2a33 (patch) | |
tree | 0ab30166ce1ac5923f50240597551c8504247233 /man | |
parent | fd4487f01ac5d9ae5e03adcf8120e64f2e7c6a52 (diff) | |
download | systemd-910c6d09311ff41ee6f913ff4881f4d8059c2a33.tar.gz |
Treat kernel version condition as a list of quoted checks
Before only one comparison was allowed. Let's make this more flexible:
ConditionKernelVersion = ">=4.0" "<=4.5"
Fixes #12881.
This also fixes expressions like "ConditionKernelVersion=>" which would
evaluate as true.
Diffstat (limited to 'man')
-rw-r--r-- | man/systemd.unit.xml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 045931038b..0ac9ff4882 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -1136,10 +1136,11 @@ <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>, <literal>></literal> a relative version - comparison is done, otherwise the specified string is matched with shell-style globs.</para> + 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><</literal>, + <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 |