[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #29668] Long lines with all boot parameters in grub.cfg

From: Alain SAURAT
Subject: [bug #29668] Long lines with all boot parameters in grub.cfg
Date: Sun, 25 Apr 2010 21:04:55 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv: Gecko/20100401 Ubuntu/9.10 (karmic) Firefox/3.5.9


                 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: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.98
         Reproducibility: Every Time
         Planned Release: None



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 ....
if [ "$prime" = "'" ]; then
  title="$(echo $@ | sed "s/.*'\(.*\)'.*/\1/" | sed 's/://g')"

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
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:
40grub2 but with a lot of echo for debuging


Reply to this item at:


  Message posté via/par Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]