summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-containers/cgroup-lite/cgroup-lite_1.1.bb22
-rwxr-xr-xrecipes-containers/cgroup-lite/files/cgroups-init27
2 files changed, 49 insertions, 0 deletions
diff --git a/recipes-containers/cgroup-lite/cgroup-lite_1.1.bb b/recipes-containers/cgroup-lite/cgroup-lite_1.1.bb
new file mode 100644
index 00000000..3ca5238c
--- /dev/null
+++ b/recipes-containers/cgroup-lite/cgroup-lite_1.1.bb
@@ -0,0 +1,22 @@
1SECTION = "devel"
2SUMMARY = "Light-weight package to set up cgroups at system boot."
3DESCRIPTION = "Light-weight package to set up cgroups at system boot."
4HOMEPAGE = "http://packages.ubuntu.com/source/precise/cgroup-lite"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://debian/copyright;md5=5d5da4e0867cf06014f87102154d0102"
7SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/c/cgroup-lite/cgroup-lite_1.1.tar.gz"
8SRC_URI += "file://cgroups-init"
9SRC_URI[md5sum] = "041a0d8ad2b192271a2e5507fdb6809f"
10SRC_URI[sha256sum] = "e7f9992b90b5b4634f3b8fb42580ff28ff31093edb297ab872c37f61a94586bc"
11
12inherit update-rc.d
13
14INITSCRIPT_NAME = "cgroups-init"
15INITSCRIPT_PARAMS = "start 8 2 3 4 5 . stop 20 0 1 6 ."
16do_install() {
17 install -d ${D}/bin
18 install -d ${D}${sysconfdir}/init.d
19 install -m 0755 ${S}/scripts/cgroups-mount ${D}/bin
20 install -m 0755 ${S}/scripts/cgroups-umount ${D}/bin
21 install -m 0755 ${WORKDIR}/cgroups-init ${D}${sysconfdir}/init.d/cgroups-init
22}
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