get rid off expensive which call

This commit is contained in:
mh 2010-08-11 10:40:24 +02:00
parent 2f3df107de
commit 3bba0859e1

View file

@ -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