Detect NFS server by service name on Arch
Fixes #7629. nfs-server.service seems to load kernel modules it needs itself, while nfsd appears in `/proc/filesystems` only after the kernel module has been loaded, so vagrant fails to detect NFS server until it's started first time after the system has booted. This checks if the NFS service actually exists and hopes that it'll figure the stuff out itself. `list-unit-files` is utilized rather than `list-units` because systemd seems to not list units that are disabled: https://lists.fedoraproject.org/pipermail/devel/2011-November/159117.html
This commit is contained in:
parent
f511282d01
commit
73cc633b02
|
@ -11,7 +11,7 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
def self.nfs_installed(environment)
|
||||
Kernel.system("grep -Fq nfsd /proc/filesystems")
|
||||
Kernel.system("systemctl --no-pager --no-legend --plain list-unit-files --all --type=service | grep --fixed-strings --quiet nfs-server.service")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue