diff options
author | mh <mh@immerda.ch> | 2010-08-11 10:40:24 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2010-08-11 10:40:24 +0200 |
commit | 3bba0859e118a3629bcbbccf4b7b6f1c2f23fc5a (patch) | |
tree | 394c45f6970fedd6cc73038f1c8865ba9dd8e532 /lib | |
parent | 2f3df107de8a6879640f9226c5c4b9fa6f31ebe9 (diff) |
get rid off expensive which call
Diffstat (limited to 'lib')
-rw-r--r-- | lib/facter/mysql.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/facter/mysql.rb b/lib/facter/mysql.rb index e262ec1..d08dabe 100644 --- a/lib/facter/mysql.rb +++ b/lib/facter/mysql.rb @@ -1,8 +1,5 @@ Facter.add("mysql_exists") do - ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin" - setcode do - mysqlexists = system "which mysql > /dev/null 2>&1" - ($?.exitstatus == 0) + File.exist? '/usr/bin/mysql' end end |