Sha256: cdf04c24219e1f96d4856545180ab856f323168fd39b8ccfbafb37b025766d8e

Contents?: true

Size: 744 Bytes

Versions: 16

Compression:

Stored size: 744 Bytes

Contents

require 'vagrant/guest/debian'

module Vagrant
  module Guest
    class Ubuntu < Debian
      def mount_shared_folder(name, guestpath, options)
        # Mount it like normal
        super

        # Emit an upstart event if upstart is available
        vm.channel.sudo("[ -x /sbin/initctl ] && /sbin/initctl emit vagrant-mounted MOUNTPOINT=#{guestpath}")
      end

      def change_host_name(name)
        if !vm.channel.test("sudo hostname | grep '#{name}'")
          vm.channel.sudo("sed -i 's/.*$/#{name}/' /etc/hostname")
          vm.channel.sudo("sed -i 's@^\\(127[.]0[.]1[.]1[[:space:]]\\+\\)@\\1#{name} #{name.split('.')[0]} @' /etc/hosts")
          vm.channel.sudo("service hostname start")
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
vagrantup-1.0.5 lib/vagrant/guest/ubuntu.rb
vagrantup-1.0.4 lib/vagrant/guest/ubuntu.rb
vagrantup-1.0.3 lib/vagrant/guest/ubuntu.rb
vagrantup-1.0.2 lib/vagrant/guest/ubuntu.rb
vagrantup-1.0.1 lib/vagrant/guest/ubuntu.rb
vagrantup-1.0.0 lib/vagrant/guest/ubuntu.rb
vagrantup-0.9.99.2 lib/vagrant/guest/ubuntu.rb
vagrantup-0.9.99.1 lib/vagrant/guest/ubuntu.rb
boxcar-0.10005.1 lib/vagrant/guest/ubuntu.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/vagrant-1.0.5/lib/vagrant/guest/ubuntu.rb
vagrant-1.0.5 lib/vagrant/guest/ubuntu.rb
vagrant-1.0.4 lib/vagrant/guest/ubuntu.rb
vagrant-1.0.3 lib/vagrant/guest/ubuntu.rb
vagrant-1.0.2 lib/vagrant/guest/ubuntu.rb
vagrant-1.0.1 lib/vagrant/guest/ubuntu.rb
vagrant-1.0.0 lib/vagrant/guest/ubuntu.rb