Restrict benchexec-cgroup.service to systems with cgroups v1
On cgroups v2, BenchExec will currently not work anyway,
and when it does, it will likely not need any auxiliary service.
Furthermore, the existing service causes confusing behavior
on cgroups v2 by creating cgroups named "cpuacct" etc.
Description=Cgroup setup for BenchExec
Documentation=https://github.com/sosy-lab/benchexec/blob/main/doc/INSTALL.md
Documentation=https://github.com/sosy-lab/benchexec/blob/main/doc/INDEX.md
+# Only necessary on cgroupv1 systems
+ConditionControlGroupController=v1
+# Fail early if expected cgroups not mounted
+AssertPathIsMountPoint=/sys/fs/cgroup/cpuacct/
+AssertPathIsMountPoint=/sys/fs/cgroup/cpuset/
+AssertPathIsMountPoint=/sys/fs/cgroup/freezer/
+AssertPathIsMountPoint=/sys/fs/cgroup/memory/
[Service]
# Adjust the following line to configure permissions for cgroup usage.
