Class: VagrantPlugins::GuestRedHat::Cap::SSHFSClient
- Inherits:
-
Object
- Object
- VagrantPlugins::GuestRedHat::Cap::SSHFSClient
- Defined in:
- lib/vagrant-sshfs/cap/guest/redhat/sshfs_client.rb
Class Method Summary collapse
Class Method Details
.sshfs_install(machine) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/vagrant-sshfs/cap/guest/redhat/sshfs_client.rb', line 5 def self.sshfs_install(machine) rhel_version = machine.guest.capability("flavor") # Handle the case where Vagrant doesn't yet know how to # detect and return :rhel_8 https://github.com/hashicorp/vagrant/pull/11453 if Gem::Version.new(Vagrant::VERSION) < Gem::Version.new('2.2.8') rhel_version = vagrant_lt_228_flavor_compat(machine) end case rhel_version when :rhel_8 # No need to install epel. fuse-sshfs comes from the PowerTools repo # https://bugzilla.redhat.com/show_bug.cgi?id=1758884 machine.communicate.sudo("yum -y install --enablerepo=PowerTools fuse-sshfs") when :rhel_7, :rhel # rhel7 and rhel6 # Install fuse-sshfs from epel if !epel_installed(machine) epel_install(machine) end machine.communicate.sudo("yum -y install fuse-sshfs") end end |
.sshfs_installed(machine) ⇒ Object
29 30 31 |
# File 'lib/vagrant-sshfs/cap/guest/redhat/sshfs_client.rb', line 29 def self.sshfs_installed(machine) machine.communicate.test("rpm -q fuse-sshfs") end |