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
|
2018-06-14 19:48:13 +00:00
|
|
|
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
|
2016-06-05 23:10:53 +00:00
|
|
|
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
|