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

[augeas-devel] Re: [Augeas] #50: grub lense on Debian

#50: grub lense on Debian
  Reporter:  micah        |       Owner:  raphink            
      Type:  enhancement  |      Status:  new                
  Priority:  minor        |   Milestone:  next               
 Component:  Augeas       |     Version:  0.4.1              
Resolution:               |    Keywords:  grub, debian, lense
Changes (by micah):

  * type:  defect => enhancement


 The following is a summary of discussions on IRC with raphink:

 I tested this patch, it indeed exposes the comments, and allows me to
 change them. For example I was able to change #comment[44], where my kopt
 parameter was located. This is an advancement, however its uncertain if
 that particular option will always be on line 44. This wouldn't be that
 bad if I was using a program that could parse the #comments fields to find
 my option, and then once I found the value I was searching for, I could do
 a set on that line (since right now we cannot use regexps to search fields
 in augeas). However, I'm doing this with the Augeas Puppet provider, which
 is pretty limited in this respect.

 In Debian, there is a specific area of the file which is properly
 delimited, where the comments are useful to be changed. The delimiters are
 pretty specific, and would be a pretty rare coincidence that some person
 running some other distribution would put *both* of them in their file.

 Originally I thought that these headers should be "
 LIST", but raphink pointed out that there is standard grub configuration
 between these lines (the actual kernel generated lines). However, there is
 another delimiter *before* those grub configuration lines occur, "## Start
 Default Options ##" and "## End Default Options ##". If you put any
 standard comments or standard configuration between those two tags, the
 next run of update-grub will strip them. I tested this by adding "# some
 comment" and adding "color cyan/blue white/blue" and then ran update-grub
 and they were stripped. So nothing may be added there and that area could
 be parsed pretty safely.

 Lutter mentioned that he wasn't sure if this should go into the default
 grub lense or into a debian specific one, but after we discussed the
 relative improbability that someone who was not on debian would create
 those exact header/footer combination, it seemed pretty safe ("<lutter> if
 raphink can get the lens to do that, I'm all for it ;)"

Ticket URL: <https://fedorahosted.org/augeas/ticket/50#comment:3>
Augeas <http://augeas.net/>
a configuration API

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