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 2>&1" ($?.exitstatus == 0) end end