diff options
author | James Shubin <james@shubin.ca> | 2014-04-25 00:24:19 -0400 |
---|---|---|
committer | James Shubin <james@shubin.ca> | 2014-05-07 12:52:05 -0400 |
commit | 9722c0515848670d642e21a220aca37f67b65492 (patch) | |
tree | 073d7922510e00ff6ec5f37c46a8b35b0db03e0b /lib/facter/gluster_version.rb | |
parent | 32fdb618625f011b7d7387428520441a91321e0e (diff) | |
download | puppet-gluster-9722c0515848670d642e21a220aca37f67b65492.tar.gz puppet-gluster-9722c0515848670d642e21a220aca37f67b65492.tar.xz puppet-gluster-9722c0515848670d642e21a220aca37f67b65492.zip |
Pull more operating system specific data from yaml files.
This patch includes program paths.
Diffstat (limited to 'lib/facter/gluster_version.rb')
-rw-r--r-- | lib/facter/gluster_version.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/facter/gluster_version.rb b/lib/facter/gluster_version.rb index cc7bbac..bb74fc8 100644 --- a/lib/facter/gluster_version.rb +++ b/lib/facter/gluster_version.rb @@ -17,7 +17,14 @@ require 'facter' -gluster = '/usr/sbin/gluster' +# get the gluster path. this fact comes from an external fact set in: params.pp +gluster = Facter.value('gluster_program_gluster').to_s.chomp +if gluster == '' + gluster = `which gluster`.chomp + if gluster == '' + gluster = '/usr/sbin/gluster' + end +end # create the fact if the gluster executable exists if File.exist?(gluster) |