[augeas-devel] Having problems with grub lens
David Lutterkort
lutter at redhat.com
Mon Apr 26 12:12:12 UTC 2010
On Fri, 2010-04-23 at 13:34 -0700, Aaron Grewell wrote:
> Hi all,
> I'm trying to use Augeas 0.7.0 to manipulate grub.conf. Most modifications work as expected, but adding a kernel option with no parameter value does not. Augtool gives an error or else produces invalid results. I grabbed the lens from HEAD to see if the issue was resolved, but it doesn't appear to be. Examples:
>
> Default state:
> augtool> ls /files/etc/grub.conf/title[1]/kernel
> ro = (none)
> root = LABEL=/
> apm = power-off
> divider = 10
>
> Set without a value:
> augtool> set /files/etc/grub.conf/title[1]/kernel/notsc
> Not enough arguments for set
What you want is the 'clear' command - it behaves like set, but sets the
value of the tree node to NULL. The separate 'clear' command is needed,
since the second argument to set can be any string.
So, if you do
augtool> clear /files/etc/grub.conf/title[1]/kernel/notsc
you'll get
kernel /vmlinuz-2.6.18-128.el5 ro root=LABEL=/ apm=power-off divider=10 notsc
in your grub.conf.
David
More information about the augeas-devel
mailing list