Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Mar 2013
Perl Regex Remove words aftern pattern / comment out lines
1)/boot/grub/grub.conf, comment out the "splashimage" line.
2)Remove rhgb and quiet from kernel line of /boot/grub/grub.conf file.
3)/etc/sysconfig/init, change the BOOTUP line to say "BOOTUP=verbose".
It logically it seems easy but I am stuck on the regex parts. Any thoughts?
I wouldnt go the regex route, as it is a bit errorprone.
Imho, there are three ways of approaching it in a programmatic way.
1) Use augeas
This tool understands the gramar of certain config files and gives you control on how to modify them.
Based on a template and the available versions of kernels, the config files get generated
3) File copy
A bit too static for my taste, but it is possible to have a known good file in a central place and distribute it to all controlled nodes.
All three methods can be done as part of a puppet deployment.You must always face the curtain with a bow.