Hi
I've been writing a little module to handle some grub settings on RHEL
6 and appear the have run into a silly little problem that I just
can't fix.
I've trying to append the string "crashkernel=128M@16M" to the kernel
line in my grub.conf. The following module works 100% if I leave out
the "@" symbol. Any ideas how I can escape the "@" ??
I know I can use "crashkernel=auto" .... but I would like to know how
to insert any string I choose....even an "@".
Thanks
init.pp:
class grub {
include grub::grub
grub::set {
"timeout": value => 10;
}
grub::insert {
"/files/boot/grub/grub.conf/title/kernel/ro": value =>
'crashkerne128M@16M';
}
}
grub.pp:
class grub::grub {
define set ( $value ) {
$key = $name
$context = "/files/boot/grub/grub.conf"
augeas { "grub_conf/$key":
context => "$context",
onlyif => "get $key != '$value'",
changes => "set $key '$value'",
incl => '/boot/grub/grub.conf',
lens => 'grub.lns',
}
}
define insert ( $value ) {
$key = $name
$context = "/files/boot/grub/grub.conf"
augeas { "grub_conf/$key":
context => "$context",
changes => "insert '$value' after \'$key'",
incl => '/boot/grub/grub.conf',
lens => 'grub.lns',
}
}
file { "grub_conf":
name => $operatingsystem ? {
default => "/boot/grub/grub.conf",
},
}
}
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.