Closed seanmalloy closed 9 years ago
The output file in /boot/grub2/ isn't really intended to be edited, so writing a lens for it seems overkill. The /etc/default/grub configuration file can be edited via Shellvars etc.
@domcleal thanks for the quick response. I took some time to actually read the RHEL 7 GRUB 2 docs, and your suggestion makes sense.
Here is are some examples just in case someone else runs into this in the future.
Set GRUB2 boot loader timeout to 10 from the command line.
# augtool -s set /files/etc/default/grub/GRUB_TIMEOUT 10 && grub2-mkconfig -o /boot/grub2/grub.cfg
And using puppet ...
augeas { 'grub_timeout':
incl => '/etc/default/grub',
lens => 'ShellVars.lns',
changes => 'set GRUB_TIMEOUT 10',
}
exec { '/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg':
subscribe => Augeas['grub_timeout'],
refreshonly => true
}
I'm going to go ahead and close out this issue.
RHEL 7 uses GRUB version 2. A lense does not seem to exist for Grub 2.