aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-containers/cgroup-lite/files/cgroups-init
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/cgroup-lite/files/cgroups-init')
-rwxr-xr-xrecipes-containers/cgroup-lite/files/cgroups-init27
1 files changed, 27 insertions, 0 deletions
diff --git a/recipes-containers/cgroup-lite/files/cgroups-init b/recipes-containers/cgroup-lite/files/cgroups-init
new file mode 100755
index 0000000..e504024
--- /dev/null
+++ b/recipes-containers/cgroup-lite/files/cgroups-init
@@ -0,0 +1,27 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: cgroups mount
+# Required-Start: $network $remote_fs
+# Required-Stop: $network $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: mount/unmount cgroups
+### END INIT INFO
+
+# must start before libvirtd is run
+case "$1" in
+ start)
+ echo -n "Mounting cgroups..."
+ /bin/cgroups-mount
+ echo "Done"
+ ;;
+ stop)
+ echo -n "Unmounting cgroups..."
+ /bin/cgroups-umount
+ echo "Done"
+ ;;
+ *)
+ echo "Usage: /etc/init.d/cgroups-init {start|stop}"
+ exit 1
+ ;;
+esac