core: refuse cgroupv1 unless SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE
Also, add a 30s sleep even if cgroup v1 is forced. Closes #30852
This commit is contained in:
@@ -518,6 +518,9 @@ int mount_cgroup_legacy_controllers(bool loaded_policy) {
|
||||
if (!cg_is_legacy_wanted())
|
||||
return 0;
|
||||
|
||||
if (!cg_is_legacy_force_enabled())
|
||||
return -ERFKILL;
|
||||
|
||||
FOREACH_ARRAY(mp, cgroupv1_mount_table, ELEMENTSOF(cgroupv1_mount_table)) {
|
||||
r = mount_one(mp, loaded_policy);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user