]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
fix cpuset configuration with smp only
authorDaniel Lezcano <daniel.lezcano@free.fr>
Wed, 24 Feb 2010 09:57:42 +0000 (10:57 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Wed, 24 Feb 2010 09:57:42 +0000 (10:57 +0100)
Do not check CPUSET configuration when SMP is not enabled.

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

index 3cc7608bc2bace52a25bee2edf3d71fabe4c5364..78c433e0a6f335b8b317a017f34dfcb451a8aa6d 100755 (executable)
@@ -9,9 +9,17 @@ SETCOLOR_FAILURE="echo -en \\033[1;31m"
 SETCOLOR_WARNING="echo -en \\033[1;33m"
 SETCOLOR_NORMAL="echo -en \\033[0;39m"
 
+is_set() {
+    $GREP -q "$1=[y|m]" $CONFIG
+    RES=$?
+
+    return $?
+}
+
 is_enabled() {
     mandatory=$2
-    $GREP -q "$1=[y|m]" $CONFIG
+
+    is_set $1
     RES=$?
 
     if [ $RES = 0 ]; then
@@ -54,13 +62,13 @@ echo -n "Network namespace: " && is_enabled CONFIG_NET_NS
 echo -n "Multiple /dev/pts instances: " && is_enabled DEVPTS_MULTIPLE_INSTANCES
 echo
 echo "--- Control groups ---"
-echo -n "Cgroup: " && is_enabled CONFIG_CGROUPS
+echo -n "Cgroup: " && is_enabled CONFIG_CGROUPS yes
 echo -n "Cgroup namespace: " && is_enabled CONFIG_CGROUP_NS
 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
 echo -n "Cgroup memory controller: " && is_enabled CONFIG_CGROUP_MEM_RES_CTLR
-echo -n "Cgroup cpuset: " && is_enabled CONFIG_CPUSETS
+is_set CONFIG_SMP && echo -n "Cgroup cpuset: " && is_enabled CONFIG_CPUSETS
 echo
 echo "--- Misc ---"
 echo -n "Veth pair device: " && is_enabled CONFIG_VETH