* Fix Amazon image generation (broken by r32913).
svn path=/nixos/trunk/; revision=33032
This commit is contained in:
parent
b4d16ef07e
commit
b6d43e1aca
|
@ -26,23 +26,22 @@ if [ "$action" = "switch" -o "$action" = "boot" ]; then
|
||||||
|
|
||||||
if [ "@bootLoader@" = "grub" ]; then
|
if [ "@bootLoader@" = "grub" ]; then
|
||||||
|
|
||||||
if [ -n "@grubDevice@" ]; then
|
if [ -n "@grubDevices@" ]; then
|
||||||
mkdir -m 0700 -p /boot/grub
|
mkdir -m 0700 -p /boot/grub
|
||||||
@menuBuilder@ @out@
|
@menuBuilder@ @out@
|
||||||
|
|
||||||
if [ "@grubDevice@" != nodev ]; then
|
# If the GRUB version has changed, then force a reinstall.
|
||||||
|
oldGrubVersion="$(cat /boot/grub/version 2>/dev/null || true)"
|
||||||
# If the GRUB version has changed, then force a reinstall.
|
newGrubVersion="@grubVersion@"
|
||||||
oldGrubVersion="$(cat /boot/grub/version 2>/dev/null || true)"
|
|
||||||
newGrubVersion="@grubVersion@"
|
|
||||||
|
|
||||||
if [ "$NIXOS_INSTALL_GRUB" = 1 -o "$oldGrubVersion" != "$newGrubVersion" ]; then
|
if [ "$NIXOS_INSTALL_GRUB" = 1 -o "$oldGrubVersion" != "$newGrubVersion" ]; then
|
||||||
echo "installing the GRUB bootloader..."
|
for dev in @grubDevices@; do
|
||||||
for a in @grubDevices@; do
|
if [ "$dev" != nodev ]; then
|
||||||
@grub@/sbin/grub-install "$(readlink -f "$a")" --no-floppy
|
echo "installing the GRUB bootloader on $dev..."
|
||||||
done
|
@grub@/sbin/grub-install "$(readlink -f "$dev")" --no-floppy
|
||||||
echo "$newGrubVersion" > /boot/grub/version
|
fi
|
||||||
fi
|
done
|
||||||
|
echo "$newGrubVersion" > /boot/grub/version
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue