summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/grub/install-grub.pl
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-27 01:07:13 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-27 01:07:38 +0200
commitf07b2121f9dc23f6a69bbc815e7991c7f52fe551 (patch)
treee5c03a47d6b24f33a9dcf8aec8754c1c66b1be00 /nixos/modules/system/boot/loader/grub/install-grub.pl
parent7e8165b27714f66f553b54481c69760f592329c9 (diff)
downloadnixlib-f07b2121f9dc23f6a69bbc815e7991c7f52fe551.tar
nixlib-f07b2121f9dc23f6a69bbc815e7991c7f52fe551.tar.gz
nixlib-f07b2121f9dc23f6a69bbc815e7991c7f52fe551.tar.bz2
nixlib-f07b2121f9dc23f6a69bbc815e7991c7f52fe551.tar.lz
nixlib-f07b2121f9dc23f6a69bbc815e7991c7f52fe551.tar.xz
nixlib-f07b2121f9dc23f6a69bbc815e7991c7f52fe551.tar.zst
nixlib-f07b2121f9dc23f6a69bbc815e7991c7f52fe551.zip
Fix grub-reboot
Diffstat (limited to 'nixos/modules/system/boot/loader/grub/install-grub.pl')
-rw-r--r--nixos/modules/system/boot/loader/grub/install-grub.pl13
1 files changed, 6 insertions, 7 deletions
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl
index 34bff727b73a..af39e50ff72d 100644
--- a/nixos/modules/system/boot/loader/grub/install-grub.pl
+++ b/nixos/modules/system/boot/loader/grub/install-grub.pl
@@ -237,6 +237,7 @@ else {
         $conf .= "
             " . $grubStore->search;
     }
+    # FIXME: should use grub-mkconfig.
     $conf .= "
         " . $grubBoot->search . "
         if [ -s \$prefix/grubenv ]; then
@@ -245,14 +246,12 @@ else {
 
         # ‘grub-reboot’ sets a one-time saved entry, which we process here and
         # then delete.
-        if [ \"\${saved_entry}\" ]; then
-          # The next line *has* to look exactly like this, otherwise KDM's
-          # reboot feature won't work properly with GRUB 2.
+        if [ \"\${next_entry}\" ]; then
+          # FIXME: KDM expects the next line to be present.
           set default=\"\${saved_entry}\"
-          set saved_entry=
-          set prev_saved_entry=
-          save_env saved_entry
-          save_env prev_saved_entry
+          set default=\"\${next_entry}\"
+          set next_entry=
+          save_env next_entry
           set timeout=1
         else
           set default=$defaultEntry