aboutsummaryrefslogtreecommitdiff
path: root/sh/cgroup-release-agent.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'sh/cgroup-release-agent.sh.in')
-rw-r--r--sh/cgroup-release-agent.sh.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/sh/cgroup-release-agent.sh.in b/sh/cgroup-release-agent.sh.in
new file mode 100644
index 00000000..c3174fee
--- /dev/null
+++ b/sh/cgroup-release-agent.sh.in
@@ -0,0 +1,10 @@
+#!@SHELL@
+#
+# This is run by the kernel after the last task is removed from a
+# control group in the openrc hierarchy.
+
+cgroup=/sys/fs/cgroup/openrc
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+if [ -d ${cgroup}/$1 ]; then
+ rmdir ${cgroup}/$1
+fi