[augeas-devel] [Augeas] #150: Failure to parse grub.conf

Augeas trac at fedorahosted.org
Fri Nov 5 21:20:43 UTC 2010


#150: Failure to parse grub.conf
--------------------+-------------------------------------------------------
 Reporter:  erinn   |       Owner:  lutter
     Type:  defect  |      Status:  new   
 Priority:  minor   |   Milestone:  next  
Component:  Augeas  |     Version:  0.7.0 
 Keywords:          |  
--------------------+-------------------------------------------------------
 augeas-0.7.3-1.el5
 augeas-libs-0.7.3-1.el5

 Not able to give you the exact error but the problem is with an = after
 title, so this breaks:
 default=0
 timeout=5
 title=Red Hat Enterprise Linux Server (2.6.18-194.17.4.el5xen)
         root (hd0)
         kernel /boot/vmlinuz-2.6.18-194.17.4.el5xen ro console=hvc0
 root=/dev/xvda1 audit=1
         initrd /boot/initrd-2.6.18-194.17.4.el5xen.img

 This works:
 default=0
 timeout=5
 title Red Hat Enterprise Linux Server (2.6.18-194.17.4.el5xen)
         root (hd0)
         kernel /boot/vmlinuz-2.6.18-194.17.4.el5xen ro console=hvc0
 root=/dev/xvda1 audit=1
         initrd /boot/initrd-2.6.18-194.17.4.el5xen.img

 Now the grub manual says that it is supposed to be title with a space
 after it and the first non white space character is used as the actual
 title, however it appears that both a space and an = will work.

 So if I were to guess, and god knows I am because I don't know squat about
 your lense syntax I would say this line needs to be changed.
 From:
 let title = del /title[ \t]+/ "title " . value_to_eol . eol
 to:
 let title = del /title[ \t=]+/ "title " . value_to_eol . eol

 And it appears to work for me (tm).

 So here is the patch:

 --- grub.aug    2010-11-05 21:15:16.000000000 +0000
 +++ /home/erinn/grub.aug        2010-11-05 21:14:21.000000000 +0000
 @@ -75,7 +75,7 @@
                       | password_arg
                       | color

 -    let title = del /title[ \t]+/ "title " . value_to_eol . eol
 +    let title = del /title[ \t=]+/ "title " . value_to_eol . eol

      (* Parse the file name and args on a kernel or module line *)
      let kernel_args =

-- 
Ticket URL: <https://fedorahosted.org/augeas/ticket/150>
Augeas <http://augeas.net/>
a configuration API




More information about the augeas-devel mailing list