mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
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.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
Description=Test for basic execution
|
||||
ConditionKernelVersion=">=3.0"
|
||||
ConditionKernelVersion=">=2.0" "<=60" "!=1.4"
|
||||
ConditionKernelVersion=" >= 2.0" " <= 60 " "!= 1.4"
|
||||
ConditionKernelVersion=" >= 2.0" " * " "*.*"
|
||||
|
||||
[Service]
|
||||
ExecStart=touch /tmp/a ; /bin/sh -c 'touch /tmp/b' ; touch /tmp/c
|
||||
|
||||
Reference in New Issue
Block a user