2018-07-11 22:40:33 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module HostVoid
|
|
|
|
module Cap
|
|
|
|
class NFS
|
|
|
|
def self.nfs_check_command(env)
|
2018-07-14 05:53:13 +00:00
|
|
|
"sudo /usr/bin/sv status nfs-server"
|
2018-07-11 22:40:33 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.nfs_start_command(env)
|
2018-07-12 22:08:05 +00:00
|
|
|
<<-EOF
|
|
|
|
/usr/bin/ln -s /etc/sv/statd /var/service/ && \
|
|
|
|
/usr/bin/ln -s /etc/sv/rpcbind /var/service/ && \
|
|
|
|
/usr/bin/ln -s /etc/sv/nfs-server /var/service/
|
|
|
|
EOF
|
2018-07-11 22:40:33 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.nfs_installed(env)
|
2019-03-05 17:19:23 +00:00
|
|
|
result = Vagrant::Util::Subprocess.execute("/usr/bin/xbps-query", "nfs-utils")
|
2018-12-19 17:44:05 +00:00
|
|
|
result.exit_code == 0
|
2018-07-11 22:40:33 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|