vagrant/plugins/hosts/void/cap/nfs.rb

25 lines
642 B
Ruby
Raw Normal View History

2018-07-11 22:40:33 +00:00
module VagrantPlugins
module HostVoid
module Cap
class NFS
def self.nfs_check_command(env)
"sudo /usr/bin/sv status nfs-server"
2018-07-11 22:40:33 +00:00
end
def self.nfs_start_command(env)
<<-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)
result = Vagrant::Util::Subprocess.execute("/usr/bin/xbps-query", "nfs-utils")
result.exit_code == 0
2018-07-11 22:40:33 +00:00
end
end
end
end
end