]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2010-10-05 Jordan Uggla <jordan.uggla@gmail.com>
authorColin Watson <cjwatson@ubuntu.com>
Tue, 5 Jan 2010 10:30:14 +0000 (10:30 +0000)
committerColin Watson <cjwatson@ubuntu.com>
Tue, 5 Jan 2010 10:30:14 +0000 (10:30 +0000)
2010-10-05  Colin Watson  <cjwatson@ubuntu.com>

* util/grub-mkconfig_lib.in (save_default_entry): Only set
saved_entry if boot_once is unset.
* util/grub.d/00_header.in: Set boot_once to "true" if there was a
previous saved entry (i.e. grub-reboot).

ChangeLog.savedefault
util/grub-mkconfig_lib.in
util/grub.d/00_header.in

index 7457c3f714c779cfdb4c00f13969b0f1e2f6816e..f07bd6bebe5692a520b1d5382b82724565258233 100644 (file)
@@ -1,3 +1,11 @@
+2010-10-05  Jordan Uggla  <jordan.uggla@gmail.com>
+2010-10-05  Colin Watson  <cjwatson@ubuntu.com>
+
+       * util/grub-mkconfig_lib.in (save_default_entry): Only set
+       saved_entry if boot_once is unset.
+       * util/grub.d/00_header.in: Set boot_once to "true" if there was a
+       previous saved entry (i.e. grub-reboot).
+
 2009-12-08  Colin Watson  <cjwatson@ubuntu.com>
 
        * util/grub.d/30_os-prober.in: Call save_default_entry for hurd.
index 95fd02ad96b9c48dc5e7d084b7b2eb4c252ba312..acfc9f6ea1cfb151104f7933eb2e5445c81c566c 100644 (file)
@@ -93,8 +93,12 @@ convert_system_path_to_grub_path ()
 save_default_entry ()
 {
   if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then
-    echo 'set saved_entry=${chosen}'
-    echo 'save_env saved_entry'
+    cat << EOF
+if [ -z \${boot_once} ]; then
+  set saved_entry=${chosen}
+  save_env saved_entry
+fi
+EOF
   fi
 }
 
index 4cd8fd30c4518ed727afed39f6d6e306aa0befff..85ce0d4a09458766602c9ba7b5652ee7614a1be3 100644 (file)
@@ -48,6 +48,7 @@ if [ \${prev_saved_entry} ]; then
   save_env saved_entry
   set prev_saved_entry=
   save_env prev_saved_entry
+  set boot_once=true
 fi
 EOF