* Only run grub-install in switch-to-configuration when

NIXOS_INSTALL_GRUB is set (which we do in the installer).

svn path=/nixu/trunk/; revision=7146
This commit is contained in:
Eelco Dolstra 2006-11-27 13:51:08 +00:00
parent 3a70748bb5
commit 8c0b223c3c
2 changed files with 4 additions and 2 deletions

View File

@ -129,4 +129,4 @@ echo "$targetDevice / somefs rw 0 0" > $mountPoint/etc/mtab
# a menu default pointing at the kernel/initrd/etc of the new
# configuration.
echo "finalising the installation..."
chroot $mountPoint /nix/var/nix/profiles/system/bin/switch-to-configuration
NIXOS_INSTALL_GRUB=1 chroot $mountPoint /nix/var/nix/profiles/system/bin/switch-to-configuration

View File

@ -19,7 +19,9 @@ export PATH=$coreutils/bin:$gnused/bin:$gnugrep/bin:$diffutils/bin
if test -n "$grubDevice"; then
mkdir -m 0700 -p /boot/grub
$grubMenuBuilder $out
$grub/sbin/grub-install "$grubDevice" --no-floppy --recheck
if test "\$NIXOS_INSTALL_GRUB" = 1; then
$grub/sbin/grub-install "$grubDevice" --no-floppy --recheck
fi
fi
EOF