Skip to content

Commit

Permalink
sh/rc-cgroup.sh: add openrc. prefix the cgroupv2 path
Browse files Browse the repository at this point in the history
Some services, like docker, creates and manages /sys/fs/cgroup/<service>
themselves. Avoid conflict with the openrc created cgroup path by adding
a `openrc.` prefix.

Fixes: #680
  • Loading branch information
ncopa committed Dec 15, 2023
1 parent bfdafe4 commit 5cda751
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sh/rc-cgroup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5cda751

Please sign in to comment.