URL:
<http://savannah.gnu.org/bugs/?29668>
Summary: Long lines with all boot parameters in grub.cfg
Project: GNU GRUB
Submitted by: maisondouf
Submitted on: dim 25 avr 2010 21:04:55 GMT
Category: Configuration
Severity: Major
Priority: 5 - Normal
Item Group: Action Request
Status: None
Privacy: Public
Assigned to: None
Originator Name: Maisondouf
Originator Email: [email protected]
Open/Closed: Open
Discussion Lock: Any
Release:
Release: 1.98
Reproducibility: Every Time
Planned Release: None
_______________________________________________________
Details:
Recently I have seen this kind of line in grub.cfg:
menuentry 'Ubuntu, avec Linux 2.6.32-21-generic' --class ubuntu --class
gnu-linux --class gnu --class os {
It seem to be due to the script "/usr/lib/linux-boot-probe/mounted/40grub2"
# The double-quoted string is the title.
title="$(echo $@ | sed 's/.*"\(.*\)".*/\1/' | sed 's/://g')"
In fact this line work to isolate the final text of the 'menuentry' but
search for a double-quoted string
I try to correct this with adding a few lines in it just after.
----
# or in fact simple-quoted string ....
prime=${title:0:1}
if [ "$prime" = "'" ]; then
title="$(echo $@ | sed "s/.*'\(.*\)'.*/\1/" | sed 's/://g')"
fi
------
I test if the result begin with a simple-quote, and if yes I reverse the
'sed' argument to isolate a simple-quoted string
So, the line in grub.cfg become :
menuentry "Ubuntu, avec Linux 2.6.32-21-generic" {
pay attention, I was obliged to use 'bash' instead of 'sh' for character
test.
Perhaps an equal solution can be found with 'sh'
Thanks, Alain
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: dim 25 avr 2010 21:04:55 GMT Name: 40grub2 Size: 2 ko By:
maisondouf
40grub2 but with a lot of echo for debuging
<http://savannah.gnu.org/bugs/download.php?file_id=20332>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?29668>
_______________________________________________
Message posté via/par Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-grub mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-grub