summaryrefslogtreecommitdiffstats
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 00000000..e5040240
--- /dev/null
+++ b/recipes-containers/cgroup-lite/files/cgroups-init
@@ -0,0 +1,27 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: cgroups mount
4# Required-Start: $network $remote_fs
5# Required-Stop: $network $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: mount/unmount cgroups
9### END INIT INFO
10
11# must start before libvirtd is run
12case "$1" in
13 start)
14 echo -n "Mounting cgroups..."
15 /bin/cgroups-mount
16 echo "Done"
17 ;;
18 stop)
19 echo -n "Unmounting cgroups..."
20 /bin/cgroups-umount
21 echo "Done"
22 ;;
23 *)
24 echo "Usage: /etc/init.d/cgroups-init {start|stop}"
25 exit 1
26 ;;
27esac