Upstream tracker: https://sourceforge.net/p/lxc/bugs/75/ the variables get assigned as: KVER_MAJOR="3\n# Linux VServer" KVER_MINOR="10\n# Linux VServer" which causes parse errors: Cgroup memory controller: + '[' 3 '#' Linux VServer -ge 3 -a 10 '#' Linux VServer -ge 6 ']' /usr/bin/lxc-checkconfig[98]: [: #: unexpected operator/operand + is_enabled CONFIG_CGROUP_MEM_RES_CTLR in this code: if [ $KVER_MAJOR -ge 3 -a $KVER_MINOR -ge 6 ]; then is_enabled CONFIG_MEMCG else is_enabled CONFIG_CGROUP_MEM_RES_CTLR fi --- $ zgrep '^# Linux' /proc/config.gz | sed -r 's/.* ([0-9])\.[0-9]{1,2}\.[0-9]{1,3}.*/\1/' 3 # Linux VServer --- $ zcat /proc/config.gz |grep '^# Linux' --- # Linux/x86_64 3.10.10 Kernel Configuration # Linux VServer --- --- lxc-0.9.0/src/lxc/lxc-checkconfig.in 2013-09-17 12:00:03.486888314 +0300 +++ lxc-0.9.0/lxc-checkconfig 2013-09-17 12:47:12.000000000 +0300 @@ -78,13 +68,13 @@ } CGROUP_MNT_PATH=`print_cgroups cgroup /proc/self/mounts | head -1` -KVER_MAJOR=$($GREP '^# Linux' $CONFIG | \ +KVER_MAJOR=$($GREP '^# Linux.*Kernel Configuration' $CONFIG | \ sed -r 's/.* ([0-9])\.[0-9]{1,2}\.[0-9]{1,3}.*/\1/') if [ "$KVER_MAJOR" = "2" ]; then -KVER_MINOR=$($GREP '^# Linux' $CONFIG | \ +KVER_MINOR=$($GREP '^# Linux.*Kernel Configuration' $CONFIG | \ sed -r 's/.* 2.6.([0-9]{2}).*/\1/') else -KVER_MINOR=$($GREP '^# Linux' $CONFIG | \ +KVER_MINOR=$($GREP '^# Linux.*Kernel Configuration' $CONFIG | \ sed -r 's/.* [0-9]\.([0-9]{1,3})\.[0-9]{1,3}.*/\1/') fi