Fix NFSClient plugin for Redhat / Centos 7 guests

Fixes #4476.
This commit is contained in:
sprin 2014-09-12 15:08:56 -07:00
parent bde0e3fb2a
commit a712f70634
1 changed files with 6 additions and 1 deletions

View File

@ -5,7 +5,12 @@ module VagrantPlugins
def self.nfs_client_install(machine)
machine.communicate.tap do |comm|
comm.sudo("yum -y install nfs-utils nfs-utils-lib")
comm.sudo("/etc/init.d/rpcbind restart; /etc/init.d/nfs restart")
case machine.guest.capability("flavor")
when :rhel_7
comm.sudo("/bin/systemctl restart rpcbind nfs")
else
comm.sudo("/etc/init.d/rpcbind restart; /etc/init.d/nfs restart")
end
end
end
end