From 8c0b223c3cbf6fc62dc8b488252d66233fc74e95 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 27 Nov 2006 13:51:08 +0000 Subject: [PATCH] * 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 --- test/installer.sh | 2 +- test/system-configuration.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/installer.sh b/test/installer.sh index d3f747c8310..04c3c80c212 100644 --- a/test/installer.sh +++ b/test/installer.sh @@ -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 diff --git a/test/system-configuration.sh b/test/system-configuration.sh index 11254a24d0a..a9351f97ade 100644 --- a/test/system-configuration.sh +++ b/test/system-configuration.sh @@ -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