summaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-26 20:48:58 +0100
committerGitHub <noreply@github.com>2017-12-26 20:48:58 +0100
commit559fdfa3e5d842e2b8f5c8cc4eb42ad5c21263c7 (patch)
tree12db114838268e9ae5285e291448b6b4a28a5b15 /man
parentman: systemd: fix typo (#7746) (diff)
parentcondition: extend ConditionKernelVersion= with relative version checks (diff)
downloadsystemd-559fdfa3e5d842e2b8f5c8cc4eb42ad5c21263c7.tar.xz
systemd-559fdfa3e5d842e2b8f5c8cc4eb42ad5c21263c7.zip
Merge pull request #7629 from poettering/condition-kernel-version
core,udev,networkd: add ConditionKernelVersion=
Diffstat (limited to 'man')
-rw-r--r--man/systemd.link.xml11
-rw-r--r--man/systemd.netdev.xml10
-rw-r--r--man/systemd.network.xml11
-rw-r--r--man/systemd.unit.xml13
4 files changed, 45 insertions, 0 deletions
diff --git a/man/systemd.link.xml b/man/systemd.link.xml
index 162674f769..fb091b883c 100644
--- a/man/systemd.link.xml
+++ b/man/systemd.link.xml
@@ -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>
diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml
index 4e5d47f585..b9647a2f7a 100644
--- a/man/systemd.netdev.xml
+++ b/man/systemd.netdev.xml
@@ -233,6 +233,16 @@
</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>
<para>Checks whether the system is running on a specific
diff --git a/man/systemd.network.xml b/man/systemd.network.xml
index 3466f3a3cf..f78beaa7dc 100644
--- a/man/systemd.network.xml
+++ b/man/systemd.network.xml
@@ -194,6 +194,17 @@
</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>
<para>Checks whether the system is running on a specific
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 005fdea73c..19a6db7f65 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -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>&lt;</literal>,
+ <literal>&lt;=</literal>, <literal>=</literal>, <literal>&gt;=</literal>, <literal>&gt;</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>