For the sysfs test to be useful, we need /sys/devices/system/cpu/ to
actually be mounted.
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
echo "==> Setting up memory/cpuset cgroup in lxcfs_test_proc"
[ ! -d /sys/devices/system/cpu ] && exit 0
+mount -o bind "${LXCFSDIR}/sys/devices/system/cpu" "/sys/devices/system/cpu"
num_cpus="$(getconf _NPROCESSORS_CONF)"
+umount -l "/sys/devices/system/cpu"
+
echo "Detected ${num_cpus} cpus"
-[ "${num_cpus}" != "0" ]
+[ "${num_cpus}" != "0" ]
PASS=1