This patch includes host and guest configuration script updates
[kvmfornfv.git] / ci / envs / host-setup0.sh
index 28c49b8..1bd7f12 100755 (executable)
@@ -9,10 +9,16 @@
 ## http://www.apache.org/licenses/LICENSE-2.0
 ###############################################################################
 
+source utils.sh
 source host-config
 
+KERNEL_VERSION=$( getKernelVersion )
+if [ -z $KERNEL_VERSION ];then
+   echo "Kernel RPM not found"
+   exit 1
+fi
 rpmdir=${1:-"/root/workspace/rpm/"}
-rpmpat="kernel-4.4*.rpm"
+rpmpat="kernel-${KERNEL_VERSION}*.rpm"
 
 config_grub () {
     key=$1
@@ -70,6 +76,6 @@ config_grub 'idle' 'poll'
 ## Disable clocksource verification at runtime
 config_grub 'tsc' 'reliable'
 
-grub2-mkconfig -o /boot/grub2/grub.cfg
-
 install_kernel
+
+grub2-mkconfig -o /boot/grub2/grub.cfg