Allow something else to mount the cgroup hierarchy
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Fri, 17 Feb 2012 09:08:31 +0000 (10:08 +0100)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Fri, 17 Feb 2012 09:08:31 +0000 (10:08 +0100)
scripts/vserver-init.functions

index 32c65d9..fef3c82 100755 (executable)
@@ -91,7 +91,8 @@ function mount_cgroup()
     if test -n "$CGROUP_MNT_PER_SS"; then
        for ss in "${CGROUP_SUBSYS[@]}"; do
            $_MKDIR -p "$CGROUP_MNT/$ss"
-           $_MOUNT -t cgroup -o "$ss" vserver "$CGROUP_MNT/$ss"
+           $_GREP -q "$CGROUP_MNT/$ss" /proc/mounts || \
+               $_MOUNT -t cgroup -o "$ss" vserver "$CGROUP_MNT/$ss"
        done
     else
        oIFS="$IFS"