Skip to content

Commit

Permalink
guest: make alpine fuse module loading match what we do for freebsd
Browse files Browse the repository at this point in the history
I'd like to keep the approach consistent.
  • Loading branch information
dustymabe committed Dec 11, 2019
1 parent bd9c857 commit 93ee746
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 93ee746

Please sign in to comment.