summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMichal Skalski <mskalski@mirantis.com>2016-05-11 14:41:58 +0200
committerMichal Skalski <mskalski@mirantis.com>2016-05-11 14:41:58 +0200
commitbece504b9a40c33f666aa9a85c7d4e57adfe19fe (patch)
tree1dda8427186703eb706f71756a402f86f7b7d311 /build
parenta3d643bc61fb04b471d8a9a518092963ac072d9e (diff)
Adjust kernel numbers comparison
With current solution kernel 4.2.0 is treated as earlier version, final comparison is: 42 < 319. This change will compare coresponding numbers of installed kernel with required version. Change-Id: Iac3aed0eb21ac8ad3138c2169299ca3b43e6e663 Signed-off-by: Michal Skalski <mskalski@mirantis.com>
Diffstat (limited to 'build')
-rw-r--r--build/Makefile5
1 files changed, 2 insertions, 3 deletions
diff --git a/build/Makefile b/build/Makefile
index ca704c0c0..7e4d5a09d 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -82,9 +82,8 @@ all:
@make -C docker
@lsb_release -a | grep Ubuntu > /dev/null 2>&1 || (echo 'Ubuntu is the only supported Linux distribution for this build system'; exit 1)
@KERNEL_VER=$$(uname -r); \
- KERNEL_VER="$${KERNEL_VER%.*-*}"; \
- KERNEL_VER="$${KERNEL_VER//.}"; \
- [ $$KERNEL_VER -ge 319 ] || (echo 'Kernel version must be 3.19 or newer'; exit 1)
+ KERNEL_ARRAY=($${KERNEL_VER//./ }); \
+ if [ $${KERNEL_ARRAY[0]} -lt 3 ] || [[ $${KERNEL_ARRAY[0]} -eq 3 && $${KERNEL_ARRAY[1]} -lt 19 ]] ; then (echo 'Kernel version must be 3.19 or newer'; exit 1) ; fi
@docker/runcontext $(DOCKERIMG) wget -q www.google.com > /dev/null 2>&1 || (echo 'No docker network connectivity or name server - check your network- and docker settings'; exit 1)
@docker/runcontext $(DOCKERIMG) $(MAKE) $(MAKEFLAGS) iso