2014-02-18 22:14:43 +00:00
|
|
|
#!/bin/bash
|
2015-02-24 18:49:47 +00:00
|
|
|
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
2014-09-04 04:56:29 +00:00
|
|
|
set -x
|
|
|
|
fi
|
2014-04-03 02:24:15 +00:00
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
2014-02-18 22:14:43 +00:00
|
|
|
|
2015-05-29 00:24:15 +00:00
|
|
|
# grub2 isn't available on rhel6/centos6; they are setup to use
|
|
|
|
# extlinux. skip this
|
|
|
|
# you would think we could match on $DISTRO or something else; but
|
|
|
|
# we can't because the rhel/centos elements are a bit mixed up;
|
|
|
|
# centos-minimal for example sets distro to "centos". so the best
|
|
|
|
# check is just for the original "grub-install" script
|
|
|
|
if [ -f /sbin/grub-install ]; then
|
2015-02-24 18:49:47 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
2014-02-18 22:14:43 +00:00
|
|
|
|
2015-05-29 00:24:15 +00:00
|
|
|
# download the latest grub2 package and setup the install script which
|
|
|
|
# will be called later by vm/finalise.d/51-bootloader
|
|
|
|
install-packages -d /tmp/grub grub2
|
2014-02-18 22:14:43 +00:00
|
|
|
echo "rpm -i /tmp/grub/*.rpm" > /tmp/grub/install
|