From: Amy Fong <amy.fong@windriver.com>
To: meta-virtualization@yoctoproject.org
Subject: [PATCH 4/5] Add cgroup-lite
Date: Fri, 27 Feb 2015 16:41:22 -0500 [thread overview]
Message-ID: <20150227214122.GD2255@windriver.com> (raw)
In-Reply-To: <20150227214013.GA2160@windriver.com>
From a2c06f9bae2e0eb6095b376adaa24f2d56870bd6 Mon Sep 17 00:00:00 2001
From: Amy Fong <amy.fong@windriver.com>
Date: Fri, 27 Feb 2015 16:00:20 -0500
Subject: [PATCH 4/5] Add cgroup-lite
Light-weight package to set up cgroups at system boot
Signed-off-by: Amy Fong <amy.fong@windriver.com>
---
recipes-containers/cgroup-lite/cgroup-lite_1.1.bb | 22 ++++++++++++++++++
recipes-containers/cgroup-lite/files/cgroups-init | 27 +++++++++++++++++++++++
2 files changed, 49 insertions(+)
create mode 100644 recipes-containers/cgroup-lite/cgroup-lite_1.1.bb
create mode 100755 recipes-containers/cgroup-lite/files/cgroups-init
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 0000000..3ca5238
--- /dev/null
+++ b/recipes-containers/cgroup-lite/cgroup-lite_1.1.bb
@@ -0,0 +1,22 @@
+SECTION = "devel"
+SUMMARY = "Light-weight package to set up cgroups at system boot."
+DESCRIPTION = "Light-weight package to set up cgroups at system boot."
+HOMEPAGE = "http://packages.ubuntu.com/source/precise/cgroup-lite"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=5d5da4e0867cf06014f87102154d0102"
+SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/c/cgroup-lite/cgroup-lite_1.1.tar.gz"
+SRC_URI += "file://cgroups-init"
+SRC_URI[md5sum] = "041a0d8ad2b192271a2e5507fdb6809f"
+SRC_URI[sha256sum] = "e7f9992b90b5b4634f3b8fb42580ff28ff31093edb297ab872c37f61a94586bc"
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "cgroups-init"
+INITSCRIPT_PARAMS = "start 8 2 3 4 5 . stop 20 0 1 6 ."
+do_install() {
+ install -d ${D}/bin
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${S}/scripts/cgroups-mount ${D}/bin
+ install -m 0755 ${S}/scripts/cgroups-umount ${D}/bin
+ install -m 0755 ${WORKDIR}/cgroups-init ${D}${sysconfdir}/init.d/cgroups-init
+}
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
--
2.1.4
next prev parent reply other threads:[~2015-02-27 21:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 21:40 [PATCH 0/5] Package docker + docker-registry Amy Fong
2015-02-27 21:40 ` [PATCH 1/5] Add golang-cross Amy Fong
2015-02-27 21:41 ` [PATCH 3/5] Package docker-registry Amy Fong
2015-02-27 21:41 ` Amy Fong [this message]
2015-02-27 21:41 ` [PATCH 5/5] Add python packages needed for docker-registry Amy Fong
2015-03-01 4:36 ` [PATCH 2/5] Package docker Amy Fong
2015-03-02 20:40 ` [PATCH 0/5] Package docker + docker-registry Bruce Ashfield
2015-03-09 18:33 ` Amy Fong
2015-03-11 18:39 ` M. Asselstine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150227214122.GD2255@windriver.com \
--to=amy.fong@windriver.com \
--cc=meta-virtualization@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.