    # File lib/chef/provider/route.rb, line 157
        def generate_config
          conf = Hash.new
          case node[:platform]
          when "centos", "redhat", "fedora"
            # walk the collection
            run_context.resource_collection.each do |resource|
              if resource.is_a? Chef::Resource::Route
                # default to eth0
                if resource.device
                  dev = resource.device
                else
                  dev = "eth0"
                end

                conf[dev] = String.new if conf[dev].nil?
                if resource.action == :add
                  conf[dev] << config_file_contents(:add, :target => resource.target, :netmask => resource.netmask, :gateway => resource.gateway)
                else
                  # need to do this for the case when the last route on an int
                  # is removed
                  conf[dev] << config_file_contents(:delete)
                end
              end
            end
            conf.each do |k, v|
              network_file_name = "/etc/sysconfig/network-scripts/route-#{k}"
              converge_by ("write route route.#{k}\n#{conf[k]} to #{ network_file_name }") do
                network_file = ::File.new(network_file_name, "w")
                network_file.puts(conf[k])
                Chef::Log.debug("#{@new_resource} writing route.#{k}\n#{conf[k]}")
                network_file.close
              end
            end
          end
        end