From 41e4753bd21a72ef20a89d591f0e4a88617e53f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Dzi=C4=99giel?= Date: Thu, 19 May 2016 12:16:59 +0200 Subject: [PATCH] Support mysql_install_db script on Gentoo On Gentoo, mysql_install_db script is installed into /usr/share/mysql/scripts and therefore is not found by mysql_datadir type. This commit adds scripts path to ENV['PATH'] so it can be found. --- lib/puppet/provider/mysql_datadir/mysql.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/puppet/provider/mysql_datadir/mysql.rb b/lib/puppet/provider/mysql_datadir/mysql.rb index bf07de5..3a31a11 100644 --- a/lib/puppet/provider/mysql_datadir/mysql.rb +++ b/lib/puppet/provider/mysql_datadir/mysql.rb @@ -5,8 +5,8 @@ Puppet::Type.type(:mysql_datadir).provide(:mysql, :parent => Puppet::Provider::M initvars - # Make sure we find mysqld on CentOS - ENV['PATH']=ENV['PATH'] + ':/usr/libexec' + # Make sure we find mysqld on CentOS and mysql_install_db on Gentoo + ENV['PATH']=ENV['PATH'] + ':/usr/libexec:/usr/share/mysql/scripts' commands :mysqld => 'mysqld' commands :mysql_install_db => 'mysql_install_db'