Add workaround for mkinitrd failing on CentOS7 19/53019/3
authorThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 8 Mar 2017 16:59:38 +0000 (16:59 +0000)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 9 Mar 2017 02:20:04 +0000 (21:20 -0500)
commit0f7e4d34634b01b2d40c4d5425b2158e2710c750
tree05987a46a0ebf7d310690b5f9b581f268cced8b7
parent8c322deeb149bdf58d03d6fed0df98ce3bd16111
Add workaround for mkinitrd failing on CentOS7

Sometimes yum update fails to produce a working grub config as the
kernel install fails to build mkinitrd. This workaround introduces a
loop to reinstall the kernel if grub.conf is missing the initramfs line
which is an indication of the mkinitrd issue. The new function will
cause a packer failure via `exit 1` if the workaround did not work.

Change-Id: Ib498a610fdd6f082575495d1b56a57b5f1802321
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
packer/provision/baseline.sh