diff --git a/libraries/helpers.rb b/libraries/helpers.rb index ad96fee6..46e93817 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -256,14 +256,6 @@ def db_init mysql_install_db_cmd end - def db_initialized? - if v80plus - ::File.exist? "#{data_dir}/mysql.ibd" - else - ::File.exist? "#{data_dir}/mysql/user.frm" - end - end - def mysql_install_db_bin return "#{base_dir}/scripts/mysql_install_db" if platform_family?('omnios') return "#{prefix_dir}/bin/mysql_install_db" if platform_family?('smartos') diff --git a/libraries/mysql_service_base.rb b/libraries/mysql_service_base.rb index 5e1fc8a5..87eab732 100644 --- a/libraries/mysql_service_base.rb +++ b/libraries/mysql_service_base.rb @@ -91,8 +91,7 @@ def initialize_database bash "#{new_resource.name} initial records" do code init_records_script umask '022' - returns [0, 1, 2] # facepalm - not_if { db_initialized? } + not_if { ::File.exist?("#{new_resource.pid_file}") } action :run end end