Currently the code tries to detect if Arch uses systemd via checking comm= of PID 1. As access to proc filesystem might be restricted due to hideproc set and systemd is default for all Arch Linux installations since October 2012, let's just ditch that check.
20 lines
460 B
Ruby
20 lines
460 B
Ruby
module VagrantPlugins
|
|
module HostArch
|
|
module Cap
|
|
class NFS
|
|
def self.nfs_check_command(env)
|
|
return "/usr/sbin/systemctl status --no-pager nfs-server.service"
|
|
end
|
|
|
|
def self.nfs_start_command(env)
|
|
return "/usr/sbin/systemctl start nfs-server.service"
|
|
end
|
|
|
|
def self.nfs_installed(environment)
|
|
Kernel.system("grep -Fq nfsd /proc/filesystems")
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|