Merge pull request #3282 from mivok/nfs_omnios
guests/omnios: mount_nfs_folder capability to omnios guests
This commit is contained in:
commit
b08c404d0b
|
@ -0,0 +1,15 @@
|
|||
module VagrantPlugins
|
||||
module GuestOmniOS
|
||||
module Cap
|
||||
class MountNFSFolder
|
||||
def self.mount_nfs_folder(machine, ip, folders)
|
||||
su_cmd = machine.config.solaris.suexec_cmd
|
||||
folders.each do |name, opts|
|
||||
machine.communicate.execute("#{su_cmd} mkdir -p #{opts[:guestpath]}")
|
||||
machine.communicate.execute("#{su_cmd} /sbin/mount '#{ip}:#{opts[:hostpath]}' '#{opts[:guestpath]}'")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -15,6 +15,11 @@ module VagrantPlugins
|
|||
require_relative "cap/change_host_name"
|
||||
Cap::ChangeHostName
|
||||
end
|
||||
|
||||
guest_capability("omnios", "mount_nfs_folder") do
|
||||
require_relative "cap/mount_nfs_folder"
|
||||
Cap::MountNFSFolder
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue