cgroup-lite-1.9/0000775000000000000000000000000012120154520010475 5ustar cgroup-lite-1.9/scripts/0000775000000000000000000000000012316365265012205 5ustar cgroup-lite-1.9/scripts/cgroups-mount0000775000000000000000000000154412120154036014742 0ustar #!/bin/sh # Copyright 2011 Canonical, Inc # Author: Serge Hallyn set -e # For simplicity this script provides no flexibility # If cgroup is mounted by fstab, don't run # Don't get too smart - bail on any uncommented entry with 'cgroup' in it if grep -v '^#' /etc/fstab | grep -q cgroup; then echo "cgroups mounted from fstab, not mounting /sys/fs/cgroup" exit 0 fi # kernel provides cgroups? if [ ! -e /proc/cgroups ]; then exit 0 fi # Mount /sys/fs/cgroup if not already done mountpoint -q /sys/fs/cgroup || mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup # get list of cgroup controllers for d in `sed -e '1d;s/\([^\t]\)\t.*$/\1/' /proc/cgroups`; do mkdir -p /sys/fs/cgroup/$d mountpoint -q /sys/fs/cgroup/$d || (mount -n -t cgroup -o $d cgroup /sys/fs/cgroup/$d || rmdir /sys/fs/cgroup/$d || true) done exit 0 cgroup-lite-1.9/scripts/cgroups-umount0000775000000000000000000000066312316365265015147 0ustar #!/bin/sh # Copyright 2011 Canonical, Inc # Author: Serge Hallyn set -e # We don't care to move tasks around gratuitously - just umount # the cgroups # If /sys/fs/cgroup is not mounted, we don't bother mountpoint -q /sys/fs/cgroup || exit 0 cd /sys/fs/cgroup for d in `sed -e '1d;s/\([^\t]\)\t.*$/\1/' /proc/cgroups`; do mountpoint -q $d && umount $d [ -d $d ] && rmdir $d || true done exit 0 cgroup-lite-1.9/debian/0000775000000000000000000000000012316365370011735 5ustar cgroup-lite-1.9/debian/source/0000775000000000000000000000000012120154520013217 5ustar cgroup-lite-1.9/debian/source/format0000664000000000000000000000001512120154036014430 0ustar 3.0 (native) cgroup-lite-1.9/debian/copyright0000664000000000000000000000156312120154036013661 0ustar Format: http://dep.debian.net/deps/dep5 Files: * Copyright: 2012 Serge Hallyn License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". cgroup-lite-1.9/debian/changelog0000664000000000000000000000500612316365367013616 0ustar cgroup-lite (1.9) trusty; urgency=medium * cgroups-umount: don't fail if umount failed. (LP: #1300481) -- Serge Hallyn Mon, 31 Mar 2014 17:22:47 -0500 cgroup-lite (1.8) raring; urgency=low * Change start condition from mounted /sys to mounted /sys/fs/cgroup. This fixes a race condition when running mountall, leading to unbootable systems in the worst case. * Add Depends on mountall (> 2.48~) as the release which first mounts /sys/fs/cgroup for us. -- Stéphane Graber Wed, 13 Mar 2013 15:52:50 -0400 cgroup-lite (1.7) raring; urgency=low * Don't exit out if actual cgroups are already mounted either. -- Serge Hallyn Tue, 12 Mar 2013 14:37:46 -0500 cgroup-lite (1.6) raring; urgency=low * scripts/cgroups-mount: don't exit out if /sys/fs/cgroup is mounted (because mountall now mounts it). cgroups-umount: don't umount /sys/fs/cgroup. -- Serge Hallyn Tue, 12 Mar 2013 13:43:06 -0500 cgroup-lite (1.5) quantal; urgency=low * use echo rather than logger -- Serge Hallyn Thu, 05 Jul 2012 11:47:43 -0500 cgroup-lite (1.4) quantal; urgency=low * Don't use awk or tail, which are not in /bin. (LP: #989354) -- Serge Hallyn Thu, 05 Jul 2012 11:21:39 -0500 cgroup-lite (1.3) quantal; urgency=low * don't conflict with libcgroup >= 0.38 -- Serge Hallyn Fri, 29 Jun 2012 11:48:11 -0500 cgroup-lite (1.2) quantal; urgency=low * move cgroups-mount and cgroups-umount to /bin, with links in /usr (LP: #989354) * cgroups-mount: log and exit (with success) if any cgroup fs is mounted anywhere (LP: #985884) * cgroups-umount: be robust if /sys/fs/cgroup does not exist. -- Serge Hallyn Wed, 20 Jun 2012 12:57:33 -0500 cgroup-lite (1.1) precise; urgency=low * debian/cgroup-lite.upstart: Exit cleanly if /sys/fs/cgroup does not exist. This happens when running a kernel (such as lucid's during upgrade) that does not support cgroups yet. (LP: #929381) -- Martin Pitt Thu, 09 Feb 2012 10:00:54 +0100 cgroup-lite (1.0) precise; urgency=low * Pull cgroup-lite out of libcgroup source package into its own. * scripts/cgroups-mount: - cleanups per doko, including adding 'set -e' (also in cgroups-umount) - add '-n' to cgroupfs mounts like cgroup-bin did. -- Serge Hallyn Mon, 09 Jan 2012 15:17:15 +0100 cgroup-lite-1.9/debian/cgroup-lite.upstart0000664000000000000000000000057312120154066015607 0ustar description "mount available cgroup filesystems" author "Serge Hallyn " start on mounted MOUNTPOINT=/sys/fs/cgroup pre-start script test -x /bin/cgroups-mount || { stop; exit 0; } test -d /sys/fs/cgroup || { stop; exit 0; } /bin/cgroups-mount end script post-stop script if [ -x /bin/cgroups-umount ] then /bin/cgroups-umount fi end script cgroup-lite-1.9/debian/control0000664000000000000000000000121012120154414013316 0ustar Source: cgroup-lite Section: admin Priority: optional Maintainer: Ubuntu Developers Build-Depends: debhelper (>= 8), Standards-Version: 3.9.4 Package: cgroup-lite Architecture: all Depends: ${misc:Depends}, mountall (>> 2.48~) Conflicts: cgroup-bin (<< 0.38) Description: Light-weight package to set up cgroups at system boot Control groups are a kernel mechanism for tracking and imposing limits on resource usage on groups of task. . This package installs an upstart job to set up cgroups when the system boots, without doing any cgroup management or doing any classification of tasks into cgroups. cgroup-lite-1.9/debian/compat0000664000000000000000000000000212120154036013117 0ustar 8 cgroup-lite-1.9/debian/bzr-builddeb.conf0000664000000000000000000000003112120154036015127 0ustar [BUILDDEB] native = True cgroup-lite-1.9/debian/links0000664000000000000000000000012212120154036012757 0ustar bin/cgroups-mount usr/bin/cgroups-mount bin/cgroups-umount usr/bin/cgroups-umount cgroup-lite-1.9/debian/rules0000775000000000000000000000110712120154036013000 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # # Modified to make a template file for a multi-binary package with separated # build-arch and build-indep targets by Bill Allombert 2001 # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ cgroup-lite-1.9/debian/dirs0000664000000000000000000000001412120154036012600 0ustar bin usr/bin cgroup-lite-1.9/debian/install0000664000000000000000000000006712120154036013315 0ustar scripts/cgroups-mount bin/ scripts/cgroups-umount bin/