Fix match? and nfs? for Arch host

This commit is contained in:
patrick brisbin 2012-10-26 14:15:58 -04:00
parent 625741ab6a
commit 6905513481
1 changed files with 10 additions and 1 deletions

View File

@ -6,7 +6,16 @@ module VagrantPlugins
module HostArch
class Host < VagrantPlugins::HostLinux::Host
def self.match?
File.exist?("/etc/rc.conf") && File.exist?("/etc/pacman.conf")
File.exist?("/etc/arch-release")
end
def self.nfs?
# HostLinux checks for nfsd which returns false unless the
# services are actively started. This leads to a misleading
# error message. Checking for nfs (no d) seems to work
# regardless. Also fixes useless use of cat, regex, and
# redirection.
Kernel.system("grep -Fq nfs /proc/filesystems")
end
# Normal, mid-range precedence.