[augeas-devel] grub lens doesn't match /boot/grub/grub.conf

Greg Swift gregswift at gmail.com
Tue Jan 10 15:39:44 UTC 2012


On Tue, Jan 10, 2012 at 09:32, Nathan Huff <Nathan.Huff at ndsu.edu> wrote:

> On 01/09/2012 06:17 PM, David Lutterkort wrote:
>
>> On Fri, 2011-12-30 at 13:46 -0600, Nathan Huff wrote:
>>
>>> Since that is the actual file that RedHat uses I think it should.  I
>>> believe the one line change below would fix it.
>>>
>>> diff -ur augeas-0.10.0.orig/lenses/**grub.aug
>>> augeas-0.10.0/lenses/grub.aug
>>> --- augeas-0.10.0.orig/lenses/**grub.aug  2011-11-28 17:51:05.000000000
>>> -0600
>>> +++ augeas-0.10.0/lenses/grub.aug       2011-12-30 13:27:13.651145502
>>> -0600
>>> @@ -276,5 +276,6 @@
>>>       (* View: filter *)
>>>       let filter = incl "/boot/grub/menu.lst"
>>>                  . incl "/etc/grub.conf"
>>> +               . incl "/boot/grub/grub.conf"
>>>
>>
>> We have /etc/grub.conf in there; that should be a symlink
>> to /boot/grub/grub.conf. Does that not work for you ?
>>
>> (I hesitate to make that change because we'll have the same file show up
>> twice in the tree, opening the door to all kinds of interesting
>> conflicts)
>>
>> David
>>
>>
>>
>>
> The problem that I am running into is actually a combination of augeas and
> puppet.  The way puppet seems to work with augeas is that it runs the
> augeas commands against the existing file and creates a copy.  It then
> checks if the copy and the original are the same if they are it removes the
> copy and does nothing.  If they aren't it replaces the original with the
> copy.  In the /etc/grub.conf case this causes the symlink to be replaced by
> a regular file.  Obviously this is a problem because grub doesn't actually
> look at /etc/grub.conf.
>
> I can work around this by telling puppet explicitly which lens to use. I
> just thought it was weird that the lens matches several files non of which
> grub actually reads directly on at least RedHat and I assume any other
> recent linux distro.
>
>
Nathan,

Very timely, I'm about to attempt to control grub with puppet+augeas on
RHEL systems.  can you post your final that deals with this issue please?

thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20120110/7c4e9503/attachment.htm>


More information about the augeas-devel mailing list