3
0
Fork 0
forked from mirrors/nixpkgs

* Canonicalize boot.loader.grub.device before calling grub-install to

ensure that values such as /dev/disk/by-id/ata-WDC... work.

svn path=/nixos/trunk/; revision=27519
This commit is contained in:
Eelco Dolstra 2011-06-22 18:22:58 +00:00
parent a2ad688a63
commit c41b01ea23

View file

@ -38,13 +38,13 @@ if [ "$action" = "switch" -o "$action" = "boot" ]; then
if [ "$NIXOS_INSTALL_GRUB" = 1 -o "$oldGrubVersion" != "$newGrubVersion" ]; then
echo "installing the GRUB bootloader..."
@grub@/sbin/grub-install "@grubDevice@" --no-floppy
@grub@/sbin/grub-install "$(readlink -f "@grubDevice@")" --no-floppy
echo "$newGrubVersion" > /boot/grub/version
fi
fi
else
echo "Warning: don't know how to make this configuration bootable; please set \`boot.grubDevice'." 1>&2
echo "Warning: don't know how to make this configuration bootable; please set \`boot.loader.grub.device'." 1>&2
fi
elif [ "@bootLoader@" = "generationsDir" ]; then