Service status check was failing because it was not being run as root. This resulted in vagrant thinking the service was not running, hence it would always try to start nfs rather than updating exports.
24 lines
607 B
Ruby
24 lines
607 B
Ruby
module VagrantPlugins
|
|
module HostVoid
|
|
module Cap
|
|
class NFS
|
|
def self.nfs_check_command(env)
|
|
"sudo /usr/bin/sv status nfs-server"
|
|
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
|
|
end
|
|
|
|
def self.nfs_installed(env)
|
|
Kernel.system("/usr/bin/xbps-query nfs-utils", [:out, :err] => "/dev/null")
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|