# File lib/knife-solo/bootstraps/freebsd.rb, line 15
    def freebsd_port_install
      ui.msg "Updating ports tree..."

      if Dir["/usr/ports/*"].empty?
        run_command("portsnap fetch extract")
      else
        run_command("portsnap update")
      end

      prepare_make_conf

      ui.msg "Installing required ports..."
      packages = %w(net/rsync ftp/curl lang/ruby19 devel/ruby-gems
                    converters/ruby-iconv devel/rubygem-rake
                    shells/bash)

      packages.each do |p|
        ui.msg "Installing #{p}..."
        result = run_command "cd /usr/ports/\#{p} && make -DBATCH -DFORCE_PKG_REGISTER install clean\n"
        raise "Couldn't install #{p} from ports." unless result.success?
      end

      ui.msg "...done installing ports."

      gem_install # chef
    end