From 5cda7517efd41ccf518a4869b0c812aedeed6ac8 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 15 Dec 2023 18:52:28 +0100 Subject: [PATCH] sh/rc-cgroup.sh: add openrc. prefix the cgroupv2 path Some services, like docker, creates and manages /sys/fs/cgroup/ themselves. Avoid conflict with the openrc created cgroup path by adding a `openrc.` prefix. Fixes: https://github.com/OpenRC/openrc/issues/680 --- sh/rc-cgroup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/rc-cgroup.sh b/sh/rc-cgroup.sh index e5c7ae7f5..759b68d25 100644 --- a/sh/rc-cgroup.sh +++ b/sh/rc-cgroup.sh @@ -191,7 +191,7 @@ cgroup2_set_limits() cgroup_path="$(cgroup2_find_path)" [ -z "${cgroup_path}" ] && return 0 mountinfo -q "${cgroup_path}"|| return 0 - rc_cgroup_path="${cgroup_path}/${RC_SVCNAME}" + rc_cgroup_path="${cgroup_path}/openrc.${RC_SVCNAME}" [ ! -d "${rc_cgroup_path}" ] && mkdir "${rc_cgroup_path}" [ -f "${rc_cgroup_path}"/cgroup.procs ] && printf 0 > "${rc_cgroup_path}"/cgroup.procs