diff options
author | Sam James <sam@gentoo.org> | 2023-11-12 06:48:18 +0000 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2023-11-14 14:31:22 -0600 |
commit | 6f180e94243885d312004ed89901329bd1a3ceb6 (patch) | |
tree | 113280d48780f392afa2473a002bf9504470133e | |
parent | 88e5d98d051c99cded4c9bdde98505b281bb3e80 (diff) |
init.d/cgroups.in: fix inconsistency between mount_cgroups and mount_cgroups
965de92b37cbe8d8670f6cc956e1d10677551e19 changed the default cgroup mode which
exposes an issue in init.d/cgroups.in.
While mount_cgroups defaults to 'unified' if rc_cgroup_mode is unset, cgroup2_controllers
has no default and therefore has a mismatch with the logic in mount_cgroups. The
two should be consistent so the flow makes sense, as mount_cgroups expects a certain
path to be taken in cgroup2_controllers.
Make cgroup2_controllers default to 'unified' if rc_cgroup_mode is unset, just
like mount_cgroups.
Bug: https://bugs.gentoo.org/916964
Thanks-to: acab@digitalfuture.it
-rw-r--r-- | init.d/cgroups.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/init.d/cgroups.in b/init.d/cgroups.in index faf53d8a..218cce7d 100644 --- a/init.d/cgroups.in +++ b/init.d/cgroups.in @@ -87,7 +87,7 @@ cgroup2_controllers() [ ! -e "${cgroup_path}/cgroup.subtree_control" ]&& return 0 read -r active < "${cgroup_path}/cgroup.controllers" for x in ${active}; do - case "$rc_cgroup_mode" in + case "${rc_cgroup_mode:-unified}" in unified) echo "+${x}" > "${cgroup_path}/cgroup.subtree_control" ;; |