Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to load nfs setting pls help #125

Open
fredfcy opened this issue Jul 28, 2018 · 2 comments
Open

unable to load nfs setting pls help #125

fredfcy opened this issue Jul 28, 2018 · 2 comments

Comments

@fredfcy
Copy link

fredfcy commented Jul 28, 2018

shell provisioner
path for shell provisioner does not exist on the host system on the host system nfs c:/homestead/script/serve-nfs.sh

@fredfcy
Copy link
Author

fredfcy commented Jul 28, 2018

this my setting file
sites:
- map: homestead.test
to: /home/vagrant/code/test/public
type: "nfs"
mount_options: ['nolock,vers=3,tcp,noatime']

@fredfcy
Copy link
Author

fredfcy commented Jul 28, 2018

this my homestead.rb file

Register All Of The Configured Shared Folders

    if settings.include? 'folders'
        settings["folders"].each do |folder|
            if File.exists? File.expand_path(folder["map"])
                mount_opts = []

                if (folder["type"] == "nfs")
                    mount_opts = folder["mount_options"] ? folder["mount_options"] : ['actimeo=1', 'nolock']
                elsif (folder["type"] == "smb")
                    mount_opts = folder["mount_options"] ? folder["mount_options"] : ['vers=3.02', 'mfsymlinks']
                end

                # For b/w compatibility keep separate 'mount_opts', but merge with options
                options = (folder["options"] || {}).merge({ mount_options: mount_opts })

                # Double-splat (**) operator only works with symbol keys, so convert
                options.keys.each{|k| options[k.to_sym] = options.delete(k) }

               settings["folders"].each do |folder|
				    config.vm.synced_folder folder["map"], folder["to"], type: folder["type"] ||= nil, :nfs => true
				end
				config.vm.network "private_network", type: "dhcp" 
                # Bindfs support to fix shared folder (NFS) permission issue on Mac
                if (folder["type"] == "nfs")
                    if Vagrant.has_plugin?("vagrant-bindfs")
                        config.bindfs.bind_folder folder["to"], folder["to"]
                    end
                end
            else
                config.vm.provision "shell" do |s|
                    s.inline = ">&2 echo \"Unable to mount one of your folders. Please check your folders in Homestead.yaml\""
                end
            end
        end
    end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant