# File lib/puppet/provider/service/freebsd.rb, line 83
 83:   def rc_add(service, rcvar, yesno)
 84:     append = "\# Added by Puppet\n#{rcvar}_enable=\"#{yesno}\"\n"
 85:     # First, try the one-file-per-service style
 86:     if File.exists?(@@rcconf_dir)
 87:       File.open(@@rcconf_dir + "/#{service}", File::WRONLY | File::APPEND | File::CREAT, 0644) {
 88:         |f| f << append
 89:         self.debug("Appended to #{f.path}")
 90:       }
 91:     else
 92:       # Else, check the local rc file first, but don't create it
 93:       if File.exists?(@@rcconf_local)
 94:         File.open(@@rcconf_local, File::WRONLY | File::APPEND) {
 95:           |f| f << append
 96:           self.debug("Appended to #{f.path}")
 97:         }
 98:       else
 99:         # At last use the standard rc.conf file
100:         File.open(@@rcconf, File::WRONLY | File::APPEND | File::CREAT, 0644) {
101:           |f| f << append
102:           self.debug("Appended to #{f.path}")
103:         }
104:       end
105:     end
106:   end