1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Fix kernel version test (RHEL: 2.6.32-123).

This commit is contained in:
Milan Broz 2011-06-09 19:48:26 +00:00
parent f4ba9c5d1e
commit cd72be458c

View File

@ -162,8 +162,8 @@ kernel_at_least() {
test $minor -lt $2 && return 1 test $minor -lt $2 && return 1
test -z "$3" && return 0 test -z "$3" && return 0
minor2=$(uname -r | cut -d. -f3) minor2=$(uname -r | cut -d. -f3 | cut -d- -f1)
test -z "$minor2" && return 0 test -z "$minor2" -a $3 -ne 0 && return 1
test $minor2 -ge $3 2>/dev/null && return 0 test $minor2 -ge $3 2>/dev/null && return 0
return 1 return 1