diff --git a/plugins/guests/redhat/cap/nfs_client.rb b/plugins/guests/redhat/cap/nfs_client.rb index b1eb4c6e4..f28a04346 100644 --- a/plugins/guests/redhat/cap/nfs_client.rb +++ b/plugins/guests/redhat/cap/nfs_client.rb @@ -5,7 +5,11 @@ module VagrantPlugins def self.nfs_client_install(machine) machine.communicate.sudo <<-EOH.gsub(/^ {12}/, '') if command -v dnf; then - dnf -y install nfs-utils nfs-utils-lib portmap + if `dnf info -q libnfs-utils > /dev/null 2>&1` ; then + dnf -y install nfs-utils libnfs-utils portmap + else + dnf -y install nfs-utils nfs-utils-lib portmap + fi else yum -y install nfs-utils nfs-utils-lib portmap fi diff --git a/test/unit/plugins/guests/redhat/cap/nfs_client_test.rb b/test/unit/plugins/guests/redhat/cap/nfs_client_test.rb index a86136e19..38a9efa69 100644 --- a/test/unit/plugins/guests/redhat/cap/nfs_client_test.rb +++ b/test/unit/plugins/guests/redhat/cap/nfs_client_test.rb @@ -23,7 +23,6 @@ describe "VagrantPlugins::GuestRedHat::Cap:NFSClient" do it "installs rsync" do cap.nfs_client_install(machine) - expect(comm.received_commands[0]).to match(/install nfs-utils nfs-utils-lib portmap/) expect(comm.received_commands[0]).to match(/\/bin\/systemctl restart rpcbind nfs/) end end