Sha256: 64172b6c62a48a3b1a52a1ccfaf70e10885d74827c4e14a7b1953645d04c8e5c
Contents?: true
Size: 864 Bytes
Versions: 2
Compression:
Stored size: 864 Bytes
Contents
module VagrantPlugins module HostBSD class Host < Vagrant.plugin("2", :host) def mount_nfs_folders(id, ips, folders) @logger.debug "Mounting NFS mounts..." folders.each do |name, opts| @logger.info opts ips.each do |ip| system("mkdir -p #{opts[:hostpath]}") mount_command = "mount -t nfs -o noatime '#{ip}:#{opts[:guestpath]}' '#{opts[:hostpath]}'" if system(mount_command) break end end end end def unmount_nfs_folders(folders) @logger.debug "Unmounting NFS mounts..." folders.each do |name, opts| if opts[:type] == :nfs_guest expanded_host_path = `printf #{opts[:hostpath]}` system("umount '#{expanded_host_path}'") end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vagrant-nfs_guest-0.0.2 | lib/vagrant-nfs_guest/hosts/bsd/host.rb |
vagrant-nfs_guest-0.0.1 | lib/vagrant-nfs_guest/hosts/bsd/host.rb |