From 05d27d20e4a3d2b036d7731ce9b66ac2bc844ab7 Mon Sep 17 00:00:00 2001 From: KATOH Yasufumi Date: Mon, 26 Aug 2013 16:56:12 +0900 Subject: [PATCH] improve slackware/plamo detection and change nfs_check_command * On Slackware, /etc/rc.d/rc.nfsd has no "status" argument, so the check command change to pidof command. * On Plamo Linux, there is no /etc/slackware-release file, so use "/usr/lib/setup/Plamo-*" instead. --- plugins/hosts/slackware/host.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/hosts/slackware/host.rb b/plugins/hosts/slackware/host.rb index 365625f39..65345280b 100644 --- a/plugins/hosts/slackware/host.rb +++ b/plugins/hosts/slackware/host.rb @@ -6,7 +6,7 @@ module VagrantPlugins module HostSlackware class Host < VagrantPlugins::HostLinux::Host def self.match? - return File.exists?("/etc/slackware-release") + return File.exists?("/etc/slackware-release") || Dir.glob("/usr/lib/setup/Plamo-*").length > 0 end # Normal, mid-range precedence. @@ -18,7 +18,7 @@ module VagrantPlugins super @nfs_apply_command = "/usr/sbin/exportfs -r" - @nfs_check_command = "/etc/rc.d/rc.nfsd status" + @nfs_check_command = "pidof nfsd > /dev/null" @nfs_start_command = "/etc/rc.d/rc.nfsd start" end end