From: Stéphane Graber Date: Tue, 18 Feb 2014 22:09:14 +0000 (-0500) Subject: lxc-checkconfig: Fix parsing on vserver kernels X-Git-Tag: lxc-1.0.0.rc4~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8525b5e51eaa34668c2697484c914e937282d59b;p=thirdparty%2Flxc.git lxc-checkconfig: Fix parsing on vserver kernels Signed-off-by: Stéphane Graber --- diff --git a/src/lxc/lxc-checkconfig.in b/src/lxc/lxc-checkconfig.in index 5e35a8173..61824540f 100644 --- a/src/lxc/lxc-checkconfig.in +++ b/src/lxc/lxc-checkconfig.in @@ -78,13 +78,13 @@ print_cgroups() { } CGROUP_MNT_PATH=`print_cgroups cgroup /proc/self/mounts | head -n 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