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,6 +5,10 @@ module VagrantPlugins
def self.nfs_client_install(machine) def self.nfs_client_install(machine)
machine.communicate.tap do |comm| machine.communicate.tap do |comm|
comm.sudo("yum -y install nfs-utils nfs-utils-lib") comm.sudo("yum -y install nfs-utils nfs-utils-lib")
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") comm.sudo("/etc/init.d/rpcbind restart; /etc/init.d/nfs restart")
end end
end end
@ -12,3 +16,4 @@ module VagrantPlugins
end end
end end
end end
end