Issue #1679 has been updated by mpalmer.
I can't reproduce the reported problems in 0.24.5.
With the following manifest:
<pre>
file { "/tmp/x^M":
ensure => "/usr/bin/perl";
}
</pre>
(Where @^M@ is produced with ^V^M in vi)
I get a file in /tmp named "x^M" (or "x?" depending on whether you're viewing
it with tab completion or @ls@) that points to /usr/bin/perl. I've also tested
"self-referential" links, like so:
<pre>
file { "/tmp/x^M":
ensure => "/tmp/x";
}
</pre>
And I still don't get any problems.
For the tab problem, I tried this:
<pre>
file { "/tmp/x":
content => " xyzzy";
}
</pre>
(Where the whitespace in the quotes is a tab, not spaces) I get a file that is
6 bytes in size, containing a tab and five alpha characters.
----------------------------------------
Bug #1679: Control characters can't be used within a file resource
http://projects.reductivelabs.com/issues/show/1679
Author: ohookins
Status: Accepted
Priority: Normal
Assigned to: community
Category: file
Target version: unplanned
Complexity: Unknown
Affected version: 0.24.5
Keywords:
Our use case is thus: occasionally users will copy perl scripts over to our
Linux machines from a Windows machine, unchanged, resulting in carriage return
characters on the end of the line. Therefore the shebang might end up looking
like this:
<pre>
#!/usr/bin/perl^M
</pre>
where the ^M is a carriage return character (you can get this in Vi by typing
^V^M). To alleviate problems with these scripts we usually create a few links:
/usr/bin/perl^M -> /usr/bin/perl
/usr/local/bin/perl^M -> /usr/bin/perl
etc.
If you attempt to put the control character ^M into the manifest to create the
link, it is ignored (or stripped out) by puppet and we end up over-writing
/usr/bin/perl with an invalid link to itself.
<pre>
file { "/usr/bin/perl^M":
ensure => "/usr/bin/perl";
}
</pre>
For the moment I've had to resort to execs to get the job done (which
unfortunately still messes with puppet's debug output due to the ^M) but it
would be nice if puppet could handle the control character natively.
----------------------------------------
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://reductivelabs.com/redmine/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
-~----------~----~----~----~------~----~------~--~---