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 |
# File 'lib/vagrant-sshfs/cap/guest/redhat/sshfs_client.rb', line 5 def self.sshfs_install(machine) case machine.guest.capability("flavor") when :rhel_8 # fuse-sshfs isn't in EPEL8 and how to get it from RHEL repos # without having to have the system subscribed is unclear: # https://github.com/dustymabe/vagrant-sshfs/issues/108#issuecomment-601061947 # Using fuse-sshfs from EPEL7 works for now so let's just go with it. # Do the install in such a way that the epel7 repo doesn't hang around # on the system, which may have unintended consequences on RHEL8. machine.communicate.sudo("rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7") machine.communicate.sudo("yum -y install fuse-sshfs --repofrompath=epel7,'http://download.fedoraproject.org/pub/epel/7/$basearch'") 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
26 27 28 |
# File 'lib/vagrant-sshfs/cap/guest/redhat/sshfs_client.rb', line 26 def self.sshfs_installed(machine) machine.communicate.test("rpm -q fuse-sshfs") end |