Issue #11051 has been updated by Egon Kastelijn.

Hi Ken,

Thanks for your quick response!

We tried both of your solutions, but both don't work.

The MySQL client really wants those backticks around identifiers 
(database-names, etc).
And a double escape gives an ugly mysql-client error also.

IMHO I think that the best solution would be to allow/recognise the escaped 
backtick as a valid escape sequence.
(or do you see another option?)

regards,

  Egon
----------------------------------------
Bug #11051: Unrecognised escape sequence '\`' in file (escaped backtick in 
manifest)
https://projects.puppetlabs.com/issues/11051

Author: Egon Kastelijn
Status: Investigating
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: puppet escape sequence backtick
Branch: 


We are developing MySQL recipes to make Puppet create and manage databases.

In order to create a MySQL database the database-name needs to be surrounded by 
backticks:

    exec { "database-${dbname}":
      command => "/usr/bin/mysql -uroot -p${mysql_password} -e \"create 
database \`${dbname}\`;\"",
      unless  => "/usr/bin/mysql -uroot -p${mysql_password} -e \"show 
databases\" |/bin/grep ^${dbname}$",
      require =>  Class["mysql::server"],
    } 

The catalogs runs fine, and the MySQL database is nicely created on the node.

The problem is that the PuppetMaster complains about an unrecognised escape 
sequence:

    Sat Nov 26 07:22:54 +0100 2011 Puppet (warning): Unrecognised escape 
sequence '\`' in file /etc/puppet/prod/modules/mysql/manifests/database.pp at 
line 15





-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to