1 2 3 4 5 6 7 8
Facter.add("mysql_exists") do ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin" setcode do mysqlexists = system "which mysql >&/dev/null" ($?.exitstatus == 0).to_s end end