# File lib/puppet/util/settings.rb, line 576
576:   def to_config
577:     str = %{The configuration file for #{Puppet[:name]}.  Note that this file
578: is likely to have unused configuration parameters in it; any parameter that's
579: valid anywhere in Puppet can be in any config file, even if it's not used.
580: 
581: Every section can specify three special parameters: owner, group, and mode.
582: These parameters affect the required permissions of any files specified after
583: their specification.  Puppet will sometimes use these parameters to check its
584: own configured state, so they can be used to make Puppet a bit more self-managing.
585: 
586: Generated on #{Time.now}.
587: 
588: }.gsub(/^/, "# ")
589: 
590: #         Add a section heading that matches our name.
591: if @config.include?(:run_mode)
592:   str += "[#{self[:run_mode]}]\n"
593:     end
594:     eachsection do |section|
595:       persection(section) do |obj|
596:         str += obj.to_config + "\n" unless ReadOnly.include? obj.name or obj.name == :genconfig
597:       end
598:     end
599: 
600:     return str
601:   end