I placed the printf string in a separate variabe, then I can double quote the
variable and it will take care of escaping correctly.

$fdisk_cmd = "c\nu\nn\np\n1\n\n\nw\n"
exec { "fdisk /dev/${name}":
  command => "printf \"$fdisk_cmd\" | fdisk /dev/${name}",
  unless  => "cat /proc/partitions | grep ${name}1",
  path    => '/sbin:/bin:/usr/bin',
}




-- 
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.

Reply via email to