Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 312967 Details for
Bug 417393
sys-boot/grub-2.00_beta5 miscalculates certain large lvm extents and starts looping forever during raid detection (plus a few minor patches)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
enable grub-reboot to use partial matches
make_grub_reboot_handle_partial_matches.patch (text/plain), 2.42 KB, created by
Doug Nazar
on 2012-05-24 16:35:09 UTC
(
hide
)
Description:
enable grub-reboot to use partial matches
Filename:
MIME Type:
Creator:
Doug Nazar
Created:
2012-05-24 16:35:09 UTC
Size:
2.42 KB
patch
obsolete
>diff -ur grub.orig/util/grub-reboot.in grub-2.00~beta5/util/grub-reboot.in >--- grub.orig/util/grub-reboot.in 2012-04-05 13:55:31.000000000 -0400 >+++ grub-2.00~beta5/util/grub-reboot.in 2012-05-21 05:00:29.000000000 -0400 >@@ -129,16 +129,52 @@ > > grubdir=`echo "${bootdir}/@grubdirname@" | sed 's,//*,/,g'` > >-prev_saved_entry=`$grub_editenv ${grubdir}/grubenv list | sed -n 's/^saved_entry=//p'` >-if [ "$prev_saved_entry" ]; then >- $grub_editenv ${grubdir}/grubenv set prev_saved_entry="$prev_saved_entry" >-else >- # 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 >+if [ ! -d "${grubdir}" ]; then >+ echo "grub directory doesn't exist." 1>&2 >+ exit 1 > fi >+ >+prev_saved_entry=`$grub_editenv ${grubdir}/grubenv list | sed -n 's/^prev_saved_entry=//p'` >+if [ -z "${prev_saved_entry}" ]; then >+ prev_saved_entry=`$grub_editenv ${grubdir}/grubenv list | sed -n 's/^saved_entry=//p'` >+ if [ "$prev_saved_entry" ]; then >+ $grub_editenv ${grubdir}/grubenv set prev_saved_entry="$prev_saved_entry" >+ else >+ # 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 >+fi >+ >+tmp=$(echo ${entry} | sed 's/[^0-9]//g') >+if [ "${tmp}" != "${entry}" -o "${tmp}" -gt 100 ]; then >+ # User specified a menuentry name. Let's check if it exists >+ name= >+ names=$(sed -n $'/^menuentry / { s/.*[\'"]\\([^\'"]*\\)[\'"].*/\\1/ ; p }' \ >+ ${grubdir}/grub.cfg | grep "${entry}") >+ if [ -z "${names}" ]; then >+ echo "entry not found." 1>&2 >+ exit 1 >+ fi >+ OLDIFS=$IFS >+ IFS=$'\n' >+ for n in ${names}; do >+ if [ "${n}" == "${entry}" ]; then >+ name="${entry}" >+ fi >+ done >+ IFS=OLDIFS >+ if [ -z "${name}" ]; then >+ name=$(echo "${names}" | head -n 1) >+ if [ "${names}" != "${name}" ]; then >+ echo "matched multiple entries. using first entry found." 1>&2 >+ fi >+ fi >+ entry="${name}" >+fi >+ > $grub_editenv ${grubdir}/grubenv set saved_entry="$entry" > > # Bye.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 417393
:
312961
|
312963
|
312965
| 312967