Handle non-script grub2-install
grub2-install has been re-written [1] so isn't always a shell script, so just exec it directly. Also use $() as that follows the rest of the file. [1] http://git.savannah.gnu.org/cgit/grub.git/commit?id=cd46aa6cefabd7b0fcb15cd614577e1ab8c7a841 Change-Id: Ib4fd7c6854fb485c0da6a79babf4a3d45a8a0f2c
This commit is contained in:
parent
c9bcce2030
commit
13eaa40e5e
@ -42,9 +42,9 @@ function install_grub2 {
|
||||
|
||||
# XXX: grub-probe on the nbd0/loop0 device returns nothing - workaround, manually
|
||||
# specify modules. https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1073731
|
||||
GRUBNAME=`which grub-install` || echo "trying grub2-install"
|
||||
GRUBNAME=$(which grub-install) || echo "trying grub2-install"
|
||||
if [ -z "$GRUBNAME" ]; then
|
||||
GRUBNAME="bash -x `which grub2-install`"
|
||||
GRUBNAME=$(which grub2-install)
|
||||
fi
|
||||
|
||||
# If no GRUB2 is found, fallback to extlinux
|
||||
|
Loading…
Reference in New Issue
Block a user