diff --git a/lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb b/lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb index 227ab9f..c53fe4f 100644 --- a/lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb +++ b/lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb @@ -5,14 +5,18 @@ class SSHFSClient def self.sshfs_install(machine) # Install sshfs machine.communicate.sudo("apk add sshfs") - - # Load the fuse module and autoload it in the feature + # Load the fuse module machine.communicate.sudo("modprobe fuse") - machine.communicate.sudo("echo fuse >> /etc/modules") end def self.sshfs_installed(machine) - machine.communicate.test("apk -e info sshfs") + installed = machine.communicate.test("apk -e info sshfs") + if installed + # fuse may not get loaded at boot, so check if it's loaded otherwise force load it + machine.communicate.sudo("lsmod | grep fuse || modprobe fuse") + end + + installed end end end