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.
This commit is contained in:
KATOH Yasufumi 2013-08-26 16:56:12 +09:00 committed by Hiroshi Miura
parent 3d886671a6
commit 05d27d20e4
1 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ module VagrantPlugins
module HostSlackware module HostSlackware
class Host < VagrantPlugins::HostLinux::Host class Host < VagrantPlugins::HostLinux::Host
def self.match? def self.match?
return File.exists?("/etc/slackware-release") return File.exists?("/etc/slackware-release") || Dir.glob("/usr/lib/setup/Plamo-*").length > 0
end end
# Normal, mid-range precedence. # Normal, mid-range precedence.
@ -18,7 +18,7 @@ module VagrantPlugins
super super
@nfs_apply_command = "/usr/sbin/exportfs -r" @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" @nfs_start_command = "/etc/rc.d/rc.nfsd start"
end end
end end