diff --git a/elements/vm/finalise.d/51-bootloader b/elements/vm/finalise.d/51-bootloader index a53221ec9..d8d626faf 100755 --- a/elements/vm/finalise.d/51-bootloader +++ b/elements/vm/finalise.d/51-bootloader @@ -167,7 +167,7 @@ function install_grub2 { # grub-mkconfig generates a config with the device in it, # This shouldn't be needed, but old code has bugs DIB_RELEASE=${DIB_RELEASE:-} - if [ $DIB_RELEASE = 'precise' ] || [ $DIB_RELEASE = 'wheezy' ]; then + if [ "$DIB_RELEASE" = 'precise' ] || [ "$DIB_RELEASE" = 'wheezy' ]; then sed -i "s%search --no.*%%" $GRUB_CFG sed -i "s%set root=.*%set root=(hd0,1)%" $GRUB_CFG fi @@ -178,7 +178,7 @@ function install_grub2 { sed -i "s%search --no-floppy --fs-uuid --set=root .*$%search --no-floppy --set=root --label ${DIB_ROOT_LABEL}%" $GRUB_CFG sed -i "s%root=UUID=[A-Za-z0-9\-]*%root=LABEL=${DIB_ROOT_LABEL}%" $GRUB_CFG if [ "$DISTRO_NAME" = 'fedora' ] ; then - if [ $DIB_RELEASE = '19' ]; then + if [ "$DIB_RELEASE" = '19' ]; then sed -i "s%UUID=[A-Za-z0-9\-]*%LABEL=${DIB_ROOT_LABEL}%" /etc/fstab fi fi