Merge pull request #1209 from pbrisbin/arch-fix-3
Additional Arch host class fixes
This commit is contained in:
commit
f72054b195
|
@ -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.
|
||||
|
@ -52,7 +61,7 @@ module VagrantPlugins
|
|||
# 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 systemd?
|
||||
Kernel.system("which systemctl &>/dev/null")
|
||||
`ps -o comm= 1`.chomp == 'systemd'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue