/usr/bin/cgroups-mount is in cgroup-lite 1.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #!/bin/sh
# Copyright 2011 Canonical, Inc
# Author: Serge Hallyn <serge.hallyn@canonical.com>
set -e
# For simplicity this script provides no flexibility
# If /sys/fs/cgroup is mounted, we don't run again
if [ -n "`grep /sys/fs/cgroup /proc/mounts`" ]; then
exit 0
fi
# 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
logger -t cgroup-lite "cgroups mounted from fstab, not mounting /sys/fs/cgroup"
exit 0
fi
# kernel provides cgroups?
if [ ! -e /proc/cgroups ]; then
exit 0
fi
mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
# get list of cgroup controllers
for c in `tail -n +2 /proc/cgroups | awk '{ print $1 }'`; do
mkdir /sys/fs/cgroup/$c
mount -n -t cgroup -o $c cgroup /sys/fs/cgroup/$c
done
exit 0
|