Your exec resource has a double-quoted string.

1) You're not doing variable interpolation, so that should be a
single-quoted string (per the accepted style).
2) Puppet *happens* to allow "\#". The docs on Puppet string types and
escaping
(https://docs.puppetlabs.com/puppet/3/reference/lang_datatypes.html#double-quoted-strings)
clearly list the allowed escape sequences. As \# isn't one of them, you
should be doubling the leading "\" to escape it.

If you do keep that as a double-quoted string, you need to escape $ as well.

-Jason

On 02/04/2014 11:15 AM, Andreas Dvorak wrote:
> Dear all,
>
> I have several exec resources that work fine, but the puppet master
> throws a syslog message
>
> "Unrecognised escape sequence \# in file
> /data/git/simulation/modules/base_modification/manifests/only_solaris.pp
> at line 14"
>
> 14: exec{ "/bin/sed '\#^/home#d' /etc/auto_master > /tmp/sed.tmp.$$ &&
> mv /tmp/sed.tmp.$$ /etc/auto_master":
> 15:        onlyif => "/bin/grep '^/home' /etc/auto_master"
> 16:      }
>
> I do not want to filter that mesage, but how can tell puppet this is
> fine or do I need to change the exec resource.
>
> Regards
> Andreas
> -- 
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/df83f496-54cb-4c65-9382-dd907c0393d9%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/52F123A6.4040205%40jasonantman.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to