    # File lib/chef/knife/bootstrap.rb, line 104
          def load_template(template=nil)
            # Are we bootstrapping using an already shipped template?
            if config[:template_file]
              bootstrap_files = config[:template_file]
            else
              bootstrap_files = []
              bootstrap_files << File.join(File.dirname(__FILE__), 'bootstrap', "#{config[:distro]}.erb")
              bootstrap_files << File.join(Dir.pwd, ".chef", "bootstrap", "#{config[:distro]}.erb")
              bootstrap_files << File.join(ENV['HOME'], '.chef', 'bootstrap', "#{config[:distro]}.erb")
            end

            template = Array(bootstrap_files).find do |bootstrap_template|
              Chef::Log.debug("Looking for bootstrap template in #{File.dirname(bootstrap_template)}")
              File.exists?(bootstrap_template)
            end

            unless template
              ui.info("Can not find bootstrap definition for #{config[:distro]}")
              raise Errno::ENOENT
            end

            Chef::Log.debug("Found bootstrap template in #{File.dirname(template)}")

            IO.read(template).chomp
          end