2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00

fixed kernel version detection

My debian testing produces the following output for uname:
$ uname -r
3.14-2-amd64

and so:
$ set -- `uname -r | sed 's/\./ /g'`
$ echo $1
3
$ echo $2
14-2-amd64

this causes zdtm.sh to fail for me on line 293:
[ $1 -eq 3 -a $2 -ge 11 ] && return 0

because "14-2-amd64 -ge 11" is false.

Signed-off-by: Matthias Neuer <matthias.neuer@uni-ulm.de>
Reviewed-by: Christopher Covington <cov@codeaurora.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Matthias Neuer 2014-09-18 16:39:00 +04:00 committed by Pavel Emelyanov
parent 2e200ab401
commit 725dfccfa6

View File

@ -287,7 +287,7 @@ git://git.kernel.org/pub/scm/linux/kernel/git/gorcunov/linux-cr.git
=================================================================== ===================================================================
EOF EOF
set -- `uname -r | sed 's/\./ /g'` set -- `uname -r | sed 's/[\.-]/ /g'`
[ $1 -gt 3 ] && return 0 [ $1 -gt 3 ] && return 0
[ $1 -eq 3 -a $2 -ge 11 ] && return 0 [ $1 -eq 3 -a $2 -ge 11 ] && return 0