]> git.proxmox.com Git - mirror_lxc.git/commitdiff
lxc-checkconfig takes into account cgroup.clone_children
authorDaniel Lezcano <daniel.lezcano@free.fr>
Tue, 9 Aug 2011 18:02:31 +0000 (20:02 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Tue, 9 Aug 2011 18:02:31 +0000 (20:02 +0200)
Take into account we may have the clone_children flag on the cgroup,
so we ignore cgroup namespace in this case.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc-checkconfig.in

index ab27b9cd17c5da9fce2ffc4b849813410811501c..5dcf3a44b87c2608b77fddec812ff8c64fd2c8e9 100755 (executable)
@@ -62,8 +62,17 @@ echo -n "Network namespace: " && is_enabled CONFIG_NET_NS
 echo -n "Multiple /dev/pts instances: " && is_enabled DEVPTS_MULTIPLE_INSTANCES
 echo
 echo "--- Control groups ---"
+
+CGROUP_MNT_PATH=$(grep -m1 "^cgroup" /proc/self/mounts | awk '{ print $2 }')
+
 echo -n "Cgroup: " && is_enabled CONFIG_CGROUPS yes
-echo -n "Cgroup namespace: " && is_enabled CONFIG_CGROUP_NS
+
+if [ -f $CGROUP_MNT_PATH/cgroup.clone_children ]; then
+    echo -n "Cgroup clone_children flag: " &&
+    $SETCOLOR_SUCCESS && echo -e "enabled" && $SETCOLOR_NORMAL
+else
+    echo -n "Cgroup namespace: " && is_enabled CONFIG_CGROUP_NS yes
+fi
 echo -n "Cgroup device: " && is_enabled CONFIG_CGROUP_DEVICE
 echo -n "Cgroup sched: " && is_enabled CONFIG_CGROUP_SCHED
 echo -n "Cgroup cpu account: " && is_enabled CONFIG_CGROUP_CPUACCT