2014-01-10 00:58:20 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module GuestRedHat
|
|
|
|
module Cap
|
|
|
|
class NFSClient
|
|
|
|
def self.nfs_client_install(machine)
|
2016-06-05 23:10:53 +00:00
|
|
|
machine.communicate.sudo <<-EOH.gsub(/^ {12}/, '')
|
|
|
|
if command -v dnf; then
|
|
|
|
dnf -y install nfs-utils nfs-utils-lib portmap
|
|
|
|
else
|
|
|
|
yum -y install nfs-utils nfs-utils-lib portmap
|
|
|
|
fi
|
2015-06-30 08:21:58 +00:00
|
|
|
|
2016-06-05 23:10:53 +00:00
|
|
|
if test $(ps -o comm= 1) == 'systemd'; then
|
|
|
|
/bin/systemctl restart rpcbind nfs
|
|
|
|
else
|
|
|
|
/etc/init.d/rpcbind restart
|
|
|
|
/etc/init.d/nfs restart
|
|
|
|
fi
|
|
|
|
EOH
|
2014-01-10 00:58:20 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|