diff --git a/plugins/guests/ubuntu/guest.rb b/plugins/guests/ubuntu/guest.rb index 76d768f41..ed4311cea 100644 --- a/plugins/guests/ubuntu/guest.rb +++ b/plugins/guests/ubuntu/guest.rb @@ -13,6 +13,17 @@ module VagrantPlugins vm.communicate.sudo("[ -x /sbin/initctl ] && /sbin/initctl emit vagrant-mounted MOUNTPOINT=#{guestpath}") end + def mount_nfs(ip, folders) + # Mount it like normal + super + + # Emit an upstart events if upstart is available + folders.each do |name, opts| + real_guestpath = expanded_guest_path(opts[:guestpath]) + vm.channel.sudo("[ -x /sbin/initctl ] && /sbin/initctl emit vagrant-mounted MOUNTPOINT=#{real_guestpath}") + end + end + def change_host_name(name) vm.communicate.tap do |comm| if !comm.test("sudo hostname | grep '#{name}'")