Fix the kernel version been deployed on VMs

Base on the http://packages.ubuntu.com/trusty/kernel/, the
linux-image-generic will install the 3.13.0.112.120 [amd64, i386]
kernel. leave it empty will do nothing to the kernel. this is
important when you deploy ubuntu 14.04.5 on VMs which use 4.4 rather
then 3.13.

Change-Id: I7984edaef5a65320ec3b10085646e8ad5c93f65d
This commit is contained in:
Weezer Su 2017-03-14 19:45:30 -05:00 committed by Jesse Pretorius (odyssey4me)
parent eacb01c0a0
commit 9a48d3728d

View File

@ -26,9 +26,7 @@ DEFAULT_IMAGE="${DEFAULT_IMAGE:-"$(lsb_release -sd | awk '{print $2}')"}"
# The default kernel for Image, leave it empty will install the lastest kernel.
DEFAULT_KERNEL="${DEFAULT_KERNEL:-}"
if [ -z "$DEFAULT_KERNEL" ]; then
DEFAULT_KERNEL=linux-image-generic
else
if [ -n "$DEFAULT_KERNEL" ]; then
DEFAULT_KERNEL="linux-image-$DEFAULT_KERNEL-generic"
fi