cgroups: only create the cgroup when the service is being started
This commit is contained in:
parent
fb4aa20d05
commit
cea71369e9
@ -189,8 +189,8 @@ unset _conf_d
|
|||||||
# Load any system overrides
|
# Load any system overrides
|
||||||
sourcex -e "@SYSCONFDIR@/rc.conf"
|
sourcex -e "@SYSCONFDIR@/rc.conf"
|
||||||
|
|
||||||
if [ "$RC_UNAME" = "Linux" ]; then
|
if [ "$RC_UNAME" = "Linux" -a "$1" = "start" ]; then
|
||||||
if [ -d /sys/fs/cgroup/openrc ] && checkpath -W /sys/fs/cgroup/openrc ; then
|
if [ -d /sys/fs/cgroup/openrc ]; then
|
||||||
mkdir -p /sys/fs/cgroup/openrc/${RC_SVCNAME}
|
mkdir -p /sys/fs/cgroup/openrc/${RC_SVCNAME}
|
||||||
echo $$ > /sys/fs/cgroup/openrc/${RC_SVCNAME}/tasks
|
echo $$ > /sys/fs/cgroup/openrc/${RC_SVCNAME}/tasks
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user