2013-09-01 20:46:09 +00:00
|
|
|
require Vagrant.source_root.join("plugins/guests/linux/cap/mount_nfs")
|
2013-05-11 14:11:57 +00:00
|
|
|
|
|
|
|
module VagrantPlugins
|
|
|
|
module GuestUbuntu
|
|
|
|
module Cap
|
|
|
|
class MountNFS < GuestLinux::Cap::MountNFS
|
|
|
|
def self.mount_nfs_folder(machine, ip, folders)
|
|
|
|
super
|
2013-09-01 20:46:09 +00:00
|
|
|
|
2013-05-11 14:11:57 +00:00
|
|
|
# Emit an upstart events if upstart is available
|
|
|
|
folders.each do |name, opts|
|
|
|
|
real_guestpath = machine.guest.capability(:shell_expand_guest_path, opts[:guestpath])
|
|
|
|
machine.communicate.sudo("[ -x /sbin/initctl ] && /sbin/initctl emit vagrant-mounted MOUNTPOINT=#{real_guestpath}")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|