Issue #4746 has been updated by Markus Roberts.

Status changed from Accepted to Closed

Pushed to 2.6.x as commit:bba04e08ccf631291a042cca5985591899eca869
----------------------------------------
Bug #4746: FreeBSD service should end writing to /etc/rc.conf with a newline
http://projects.puppetlabs.com/issues/4746

Author: Fredrik Eriksson
Status: Closed
Priority: Normal
Assignee: James Turnbull
Category: service
Target version: 2.6.2
Affected version: 
Keywords: 
Branch: 


I have a few ensure_key_value rules (from 
http://projects.reductivelabs.com/projects/puppet/wiki/Simple_Text_Patterns) 
that manipulates values in /etc/rc.conf (for example to set ip-address and so 
on), and I noted that sometimes a key value was not added on a new line, but 
instead appended on the line before.

It turns out that when puppet enables a service it simply adds this to rc.conf:
<pre>"\n\# Added by Puppet\n#{rcvar}_enable=\"#{yesno}\""</pre>

This is all very well but it does not end with a newline, which causes problem 
when trying to echo in new lines from other rules. I've attached a patch that 
simply changes this to
<pre>"\# Added by Puppet\n#{rcvar}_enable=\"#{yesno}\"\n"</pre>

to add the newline at the end instead of the beginning.


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