Sha256: a0d37b4be35cb228e9ffb0d67ec1b172ebde946b0bac96a95b17697b13cb2a8c

Contents?: true

Size: 857 Bytes

Versions: 1

Compression:

Stored size: 857 Bytes

Contents

require "vagrant/util"
require "vagrant/util/retryable"

require Vagrant.source_root.join("plugins", "hosts", "bsd", "cap", "nfs")

module VagrantPlugins
  module HostFreeBSD
    module Cap
      class NFS
        def self.nfs_export(environment, ui, id, ips, folders)
          folders.each do |folder_name, folder_values|
            if folder_values[:hostpath] =~ /\s+/
              raise Vagrant::Errors::VagrantError,
                _key: :freebsd_nfs_whitespace
            end
          end

          HostBSD::Cap::NFS.nfs_export(environment, ui, id, ips, folders)
        end

        def self.nfs_exports_template(environment)
          "nfs/exports_freebsd"
        end

        def self.nfs_restart_command(environment)
          ["sudo", "/etc/rc.d/mountd", "onereload"]
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-cloudstack-1.2.0 vendor/bundle/bundler/gems/vagrant-c84e05fd063f/plugins/hosts/freebsd/cap/nfs.rb