Merge pull request #11212 from briancain/NFS-RHEL-FIXUP
Ensure `nfs-server` is restarted when installing nfs client for redhat guests
This commit is contained in:
commit
f5886e6044
|
@ -5,7 +5,7 @@ module VagrantPlugins
|
|||
def self.nfs_client_install(machine)
|
||||
machine.communicate.sudo <<-EOH.gsub(/^ {12}/, '')
|
||||
if command -v dnf; then
|
||||
if `dnf info -q libnfs-utils > /dev/null 2>&1` ; then
|
||||
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
|
||||
|
@ -15,7 +15,7 @@ module VagrantPlugins
|
|||
fi
|
||||
|
||||
if test $(ps -o comm= 1) == 'systemd'; then
|
||||
/bin/systemctl restart rpcbind nfs
|
||||
/bin/systemctl restart rpcbind nfs-server
|
||||
else
|
||||
/etc/init.d/rpcbind restart
|
||||
/etc/init.d/nfs restart
|
||||
|
|
|
@ -24,7 +24,7 @@ describe "VagrantPlugins::GuestRedHat::Cap:NFSClient" do
|
|||
it "installs nfs client" do
|
||||
cap.nfs_client_install(machine)
|
||||
expect(comm.received_commands[0]).to match(/install nfs-utils/)
|
||||
expect(comm.received_commands[0]).to match(/\/bin\/systemctl restart rpcbind nfs/)
|
||||
expect(comm.received_commands[0]).to match(/\/bin\/systemctl restart rpcbind nfs-server/)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue