Method: Chef::Provider::Service::Arch#update_daemons
- Defined in:
- lib/chef/provider/service/arch.rb
#update_daemons(entries) ⇒ Object
FIXME: Multiple entries of DAEMONS will cause very bad results :)
57 58 59 60 61 62 |
# File 'lib/chef/provider/service/arch.rb', line 57 def update_daemons(entries) content = ::File.read("/etc/rc.conf").gsub(/DAEMONS=\((.*)\)/m, "DAEMONS=(#{entries.join(' ')})") ::File.open("/etc/rc.conf", "w") do |f| f.write(content) end end |