Skip to content

Commit

Permalink
guest: Add alpine support
Browse files Browse the repository at this point in the history
  • Loading branch information
timschumi committed Jul 12, 2019
1 parent 46b08a3 commit 7e6ba5e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module VagrantPlugins
module GuestAlpine
module Cap
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
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")
end
end
end
end
end
10 changes: 10 additions & 0 deletions lib/vagrant-sshfs/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ class Plugin < Vagrant.plugin("2")
VagrantPlugins::GuestArch::Cap::SSHFSClient
end

guest_capability("alpine", "sshfs_installed") do
require_relative "cap/guest/alpine/sshfs_client"
VagrantPlugins::GuestAlpine::Cap::SSHFSClient
end

guest_capability("alpine", "sshfs_install") do
require_relative "cap/guest/alpine/sshfs_client"
VagrantPlugins::GuestAlpine::Cap::SSHFSClient
end

guest_capability("suse", "sshfs_installed") do
require_relative "cap/guest/suse/sshfs_client"
VagrantPlugins::GuestSUSE::Cap::SSHFSClient
Expand Down

0 comments on commit 7e6ba5e

Please sign in to comment.