<br><div class="gmail_quote">On Tue, Jan 10, 2012 at 09:51, Nathan Huff <span dir="ltr"><<a href="mailto:Nathan.Huff@ndsu.edu">Nathan.Huff@ndsu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 01/10/2012 09:39 AM, Greg Swift wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
On Tue, Jan 10, 2012 at 09:32, Nathan Huff <<a href="mailto:Nathan.Huff@ndsu.edu" target="_blank">Nathan.Huff@ndsu.edu</a><br></div><div class="im">
<mailto:<a href="mailto:Nathan.Huff@ndsu.edu" target="_blank">Nathan.Huff@ndsu.edu</a>>> wrote:<br>
<br>
On 01/09/2012 06:17 PM, David Lutterkort wrote:<br>
<br>
On Fri, 2011-12-30 at 13:46 -0600, Nathan Huff wrote:<br>
<br>
Since that is the actual file that RedHat uses I think it<br>
should. I<br>
believe the one line change below would fix it.<br>
<br></div>
diff -ur augeas-0.10.0.orig/lenses/__<u></u>grub.aug<br>
augeas-0.10.0/lenses/grub.aug<br>
--- augeas-0.10.0.orig/lenses/__<u></u>grub.aug 2011-11-28<div><div class="h5"><br>
17:51:05.000000000 -0600<br>
+++ augeas-0.10.0/lenses/grub.aug 2011-12-30<br>
13:27:13.651145502 -0600<br>
@@ -276,5 +276,6 @@<br>
(* View: filter *)<br>
let filter = incl "/boot/grub/menu.lst"<br>
. incl "/etc/grub.conf"<br>
+ . incl "/boot/grub/grub.conf"<br>
<br>
<br>
We have /etc/grub.conf in there; that should be a symlink<br>
to /boot/grub/grub.conf. Does that not work for you ?<br>
<br>
(I hesitate to make that change because we'll have the same file<br>
show up<br>
twice in the tree, opening the door to all kinds of interesting<br>
conflicts)<br>
<br>
David<br>
<br>
<br>
<br>
<br>
The problem that I am running into is actually a combination of<br>
augeas and puppet. The way puppet seems to work with augeas is that<br>
it runs the augeas commands against the existing file and creates a<br>
copy. It then checks if the copy and the original are the same if<br>
they are it removes the copy and does nothing. If they aren't it<br>
replaces the original with the copy. In the /etc/grub.conf case<br>
this causes the symlink to be replaced by a regular file. Obviously<br>
this is a problem because grub doesn't actually look at /etc/grub.conf.<br>
<br>
I can work around this by telling puppet explicitly which lens to<br>
use. I just thought it was weird that the lens matches several files<br>
non of which grub actually reads directly on at least RedHat and I<br>
assume any other recent linux distro.<br>
<br>
<br>
Nathan,<br>
<br>
Very timely, I'm about to attempt to control grub with puppet+augeas on<br>
RHEL systems. can you post your final that deals with this issue please?<br>
<br>
thanks<br>
</div></div></blockquote>
<br>
You have to set the incl and lens parameters rather than the context parameter. See below for an example.<br>
<br>
#<br>
# remove "rhgb" and "quiet" from every kernel title line, if present<br>
#<br>
augeas { 'grub.conf/no_rhgb':<br>
incl => '/boot/grub/grub.conf',<br>
lens => 'grub.lns',<br>
changes => [<br>
'rm title[*]/kernel/rhgb',<br>
'rm title[*]/kernel/quiet'<br>
],<div class="HOEnZb"><div class="h5"><br>
}<br>
<br></div></div></blockquote><div><br>awesome.. thanks<br><br>-greg <br></div></div>