From: Yu Watanabe Date: Wed, 19 Mar 2025 21:15:35 +0000 (+0900) Subject: Introduce ConditionVersion (#36468) X-Git-Tag: v258-rc1~1043 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb8c74d7f2723ca5f507017513b77bcc98ce5208;p=thirdparty%2Fsystemd.git Introduce ConditionVersion (#36468) Add a new condition which can check against systemd version. $ systemctl --version systemd 258 (258~devel-g53ca5f6) $ systemd-analyze condition 'ConditionVersion=systemd>255' test.service: ConditionVersion=>255 succeeded. $ systemd-analyze condition 'ConditionVersion=systemd>260' test.service: ConditionVersion=>260 failed. $ systemd-analyze condition 'ConditionVersion=systemd>=258' test.service: ConditionVersion=>=258 succeeded. $ systemd-analyze condition 'ConditionVersion=systemd>=257.1' test.service: ConditionVersion=>=257.1 succeeded. $ uname -r 6.12.13-200.fc41.aarch64 $ systemd-analyze condition 'ConditionVersion=kernel > 4.4' test.service: ConditionVersion=kernel > 4.4 succeeded. $ systemd-analyze condition 'ConditionVersion=kernel > 6.20' test.service: ConditionVersion=kernel > 6.20 failed. $ systemd-analyze condition 'ConditionVersion=kernel < 9.0' test.service: ConditionVersion=kernel < 9.0 succeeded. --- bb8c74d7f2723ca5f507017513b77bcc98ce5208