Class: VagrantPlugins::GuestAlpine::Cap::SSHFSClient

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb

Class Method Summary collapse

Class Method Details

.sshfs_install(machine) ⇒ Object



5
6
7
8
9
10
# File 'lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb', line 5

def self.sshfs_install(machine)
  # Install sshfs
  machine.communicate.sudo("apk add sshfs")
  # Load the fuse module
  machine.communicate.sudo("modprobe fuse")
end

.sshfs_installed(machine) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb', line 12

def self.sshfs_installed(machine)
  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