From a66248e2a2f97d482a3bd64e60e41cc7c7102212 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 23 Jul 2008 09:10:19 +0000 Subject: [PATCH] * Fix extraGrubEntriesBeforeNixos, it always placed the extra entries before the default (so I suddenly found myself booting into Windows...). BTW it would be better to have string-valued options like extraGrubEntriesBefore / extraGrubEntriesAfter or something like that. svn path=/nixos/trunk/; revision=12401 --- installer/grub-menu-builder.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/installer/grub-menu-builder.sh b/installer/grub-menu-builder.sh index 61a21128333..41481ffeb1d 100644 --- a/installer/grub-menu-builder.sh +++ b/installer/grub-menu-builder.sh @@ -114,20 +114,19 @@ if test -n "@copyKernels@"; then fi # Additional entries specified verbatim by the configuration. -extraGrubEntries=$(cat >> $tmp <> $tmp fi -if test -n "$tmp"; then - addEntry "NixOS - Default" $default "" -fi +addEntry "NixOS - Default" $default "" -if test -n "@extraGrubEntriesBeforeNixos@"; then - $extraGrubEntries +if test -z "@extraGrubEntriesBeforeNixos@"; then + echo "$extraGrubEntries" >> $tmp fi # Add all generations of the system profile to the menu, in reverse