Skip to content

Commit

Permalink
Merge pull request #130 from evenreven/main
Browse files Browse the repository at this point in the history
Add guest capabilities file for Rocky Linux
  • Loading branch information
dustymabe authored Jun 10, 2022
2 parents 0f5c864 + ade5564 commit c125ce8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/vagrant-sshfs/cap/guest/rocky/sshfs_client.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module VagrantPlugins
module GuestRocky
module Cap
class SSHFSClient
def self.sshfs_install(machine)
# No need to install epel. fuse-sshfs comes from the powertools repo
# https://bugzilla.redhat.com/show_bug.cgi?id=1758884
# https://github.com/dustymabe/vagrant-sshfs/issues/123
machine.communicate.sudo("yum -y install --enablerepo=powertools fuse-sshfs")
end

def self.sshfs_installed(machine)
machine.communicate.test("rpm -q fuse-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 @@ -107,6 +107,16 @@ class Plugin < Vagrant.plugin("2")
VagrantPlugins::GuestCentOS::Cap::SSHFSClient
end

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

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

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

0 comments on commit c125ce8

Please sign in to comment.