summaryrefslogtreecommitdiff
path: root/lib/facter
diff options
context:
space:
mode:
Diffstat (limited to 'lib/facter')
-rw-r--r--lib/facter/mysql.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/facter/mysql.rb b/lib/facter/mysql.rb
new file mode 100644
index 0000000..e262ec1
--- /dev/null
+++ b/lib/facter/mysql.rb
@@ -0,0 +1,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