devstack: the last fix of is_kernel_supported_for_ovs25 condition

Previously we didn't consider kernels higher than 4. This patch returns
True right away if the verions is lesser than 4. If it is 4, then it must
be lesser or equal to 3 to return True. All other versions are not
supported.

Change-Id: I3e9fa088d7cb9cfecbe7670c84a051e15be2a3a9
This commit is contained in:
Jakub Libosvar 2016-09-13 09:14:16 +02:00
parent dedb632ba5
commit c8de31cc36

View File

@ -38,7 +38,11 @@ function load_module {
function is_kernel_supported_for_ovs25 {
major=$(uname -r | cut -d\. -f 1)
minor=$(uname -r | cut -d\. -f 2)
if [ $major -lt 4 -o $minor -le 3 ]; then
if [ $major -le 3 ]; then
# All 3.x branches and lesser are supported
return 0
elif [ $major -eq 4 -a $minor -le 3 ]; then
# If it's version 4, minor must not be higher than 3
return 0
fi