diff --git a/plugins/hosts/arch/cap/nfs.rb b/plugins/hosts/arch/cap/nfs.rb index eb0c656f2..24a870d44 100644 --- a/plugins/hosts/arch/cap/nfs.rb +++ b/plugins/hosts/arch/cap/nfs.rb @@ -3,31 +3,15 @@ module VagrantPlugins module Cap class NFS def self.nfs_check_command(env) - if systemd? - return "/usr/sbin/systemctl status --no-pager nfs-server.service" - else - return "/etc/rc.d/nfs-server status" - end + return "/usr/sbin/systemctl status --no-pager nfs-server.service" end def self.nfs_start_command(env) - if systemd? - return "/usr/sbin/systemctl start nfs-server.service" - else - return "sh -c 'for s in {rpcbind,nfs-common,nfs-server}; do /etc/rc.d/$s start; done'" - end + return "/usr/sbin/systemctl start nfs-server.service" end def self.nfs_installed(environment) - Kernel.system("grep -Fq nfs /proc/filesystems") - end - - protected - - # This tests to see if systemd is used on the system. This is used - # in newer versions of Arch, and requires a change in behavior. - def self.systemd? - `ps -o comm= 1`.chomp == 'systemd' + Kernel.system("grep -Fq nfsd /proc/filesystems") end end end