lxc-checkconfig: Fix parsing on vserver kernels

parent 658979c5
...@@ -78,13 +78,13 @@ print_cgroups() { ...@@ -78,13 +78,13 @@ print_cgroups() {
} }
CGROUP_MNT_PATH=`print_cgroups cgroup /proc/self/mounts | head -n 1` 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/') sed -r 's/.* ([0-9])\.[0-9]{1,2}\.[0-9]{1,3}.*/\1/')
if [ "$KVER_MAJOR" = "2" ]; then 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/') sed -r 's/.* 2.6.([0-9]{2}).*/\1/')
else 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/') sed -r 's/.* [0-9]\.([0-9]{1,3})\.[0-9]{1,3}.*/\1/')
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment