Added fix for VM was not booting with custom kernel

This commit is contained in:
Shital Savekar 2018-06-18 16:34:38 -07:00
Родитель 81457a4ca3
Коммит 486625f820
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -170,6 +170,7 @@ InstallKernel()
UpdateTestState $ICA_TESTFAILED
else
LogMsg "CUSTOM_KERNEL_SUCCESS"
DEBIAN_FRONTEND=noninteractive apt-get -y remove linux-image-$(uname -r)
UpdateTestState $ICA_TESTCOMPLETED
fi
elif [[ $CustomKernel == *.rpm ]]; then
@ -182,13 +183,12 @@ InstallKernel()
LogMsg "Installing ${CustomKernel##*/}"
rpm -ivh "${CustomKernel##*/}" >> $logFolder/build-CustomKernel.txt 2>&1
kernelInstallStatus=$?
rpm -e kernel-$(uname -r)
else
prefix="localfile:"
LogMsg "Installing ${CustomKernel#$prefix}"
rpm -ivh "${CustomKernel#$prefix}" >> $logFolder/build-CustomKernel.txt 2>&1
kernelInstallStatus=$?
rpm -e kernel-$(uname -r)
fi
UpdateTestState $ICA_TESTCOMPLETED
@ -198,6 +198,7 @@ InstallKernel()
else
LogMsg "CUSTOM_KERNEL_SUCCESS"
UpdateTestState $ICA_TESTCOMPLETED
rpm -e kernel-$(uname -r)
grub2-set-default 0
fi
fi