2010-10-05 Jordan Uggla <jordan.uggla@gmail.com>
2010-10-05 Colin Watson <cjwatson@ubuntu.com> * util/grub-reboot.in: Make sure prev_saved_entry always gets a non-empty value.
This commit is contained in:
parent
bc11fee9f5
commit
cf2fd2a6d1
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-10-05 Jordan Uggla <jordan.uggla@gmail.com>
|
||||
2010-10-05 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
* util/grub-reboot.in: Make sure prev_saved_entry always gets a
|
||||
non-empty value.
|
||||
|
||||
2010-10-05 Jordan Uggla <jordan.uggla@gmail.com>
|
||||
2010-10-05 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
|
|
|
@ -96,7 +96,11 @@ prev_saved_entry=`$grub_editenv ${grubdir}/grubenv list | sed -n 's/^saved_entry
|
|||
if [ "$prev_saved_entry" ]; then
|
||||
$grub_editenv ${grubdir}/grubenv set prev_saved_entry="$prev_saved_entry"
|
||||
else
|
||||
$grub_editenv ${grubdir}/grubenv unset prev_saved_entry
|
||||
# We need some non-empty value for prev_saved_entry so that GRUB will
|
||||
# recognise that grub-reboot has been used and restore the previous
|
||||
# saved entry. "0" is the same as an empty value, i.e. the first menu
|
||||
# entry.
|
||||
$grub_editenv ${grubdir}/grubenv set prev_saved_entry=0
|
||||
fi
|
||||
$grub_editenv ${grubdir}/grubenv set saved_entry="$entry"
|
||||
|
||||
|
|
Loading…
Reference in a new issue