Files
systemd/src/shared
Matteo Croce c154bb65ad condition: introduce ConditionVersion=/AssertVersion=
Add a new condition wich checks against systemd version.
Change condition_test_kernel_version() into a generic condition_test_version()
so most of the code can be reused.

    $ 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.
2025-03-18 18:36:59 +09:00
..
2025-02-21 14:22:51 +01:00
2025-02-21 14:22:51 +01:00
2025-03-05 10:50:36 +01:00
2025-03-05 10:50:36 +01:00
…
…
…
…
2024-12-18 13:47:35 +01:00
…
…
2024-10-29 18:38:42 +01:00
2025-03-01 00:33:32 +09:00
…
…
…
2024-09-03 08:49:49 +02:00
…
…
…
2025-03-04 05:18:15 +09:00
2025-03-16 18:02:08 +01:00
…
2025-01-28 03:28:26 +09:00
2025-02-09 14:51:04 +01:00
2025-02-09 14:51:04 +01:00
…
…
…
…
…