From c53e4d810f24a1e82715b39928c334de5a4d8180 Mon Sep 17 00:00:00 2001 From: Philippe BEAUMONT Date: Fri, 25 Oct 2024 14:27:41 +0200 Subject: [PATCH 1/2] add freebsd compatibility on fact mysqld_version --- lib/facter/mysqld_version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/facter/mysqld_version.rb b/lib/facter/mysqld_version.rb index 249b71fd9..28bf5aba5 100644 --- a/lib/facter/mysqld_version.rb +++ b/lib/facter/mysqld_version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true Facter.add('mysqld_version') do - confine { Facter::Core::Execution.which('mysqld') || Facter::Core::Execution.which('/usr/libexec/mysqld') } + confine { Facter::Core::Execution.which('mysqld') || Facter::Core::Execution.which('/usr/libexec/mysqld') || Facter::Core::Execution.which('/usr/local/libexec/mysqld') } setcode do # Add /usr/libexec to PATH to find mysqld command Facter::Core::Execution.execute('env PATH=$PATH:/usr/libexec mysqld --no-defaults -V 2>/dev/null') From 696c3e4eb410ce2605ea00ffe34dfe9843937022 Mon Sep 17 00:00:00 2001 From: Philippe BEAUMONT Date: Fri, 25 Oct 2024 15:12:37 +0200 Subject: [PATCH 2/2] add path --- lib/facter/mysqld_version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/facter/mysqld_version.rb b/lib/facter/mysqld_version.rb index 28bf5aba5..3f155c04f 100644 --- a/lib/facter/mysqld_version.rb +++ b/lib/facter/mysqld_version.rb @@ -4,6 +4,6 @@ confine { Facter::Core::Execution.which('mysqld') || Facter::Core::Execution.which('/usr/libexec/mysqld') || Facter::Core::Execution.which('/usr/local/libexec/mysqld') } setcode do # Add /usr/libexec to PATH to find mysqld command - Facter::Core::Execution.execute('env PATH=$PATH:/usr/libexec mysqld --no-defaults -V 2>/dev/null') + Facter::Core::Execution.execute('env PATH=$PATH:/usr/libexec:/usr/local/libexec mysqld --no-defaults -V 2>/dev/null') end end