hapi-fhir/vagrant/chef/cookbooks/mysql/libraries/helpers_suse.rb

17 lines
436 B
Ruby

module MysqlCookbook
module Helpers
module Suse
def pass_string
if new_resource.parsed_server_root_password.empty?
pass_string = ''
else
pass_string = '-p' + Shellwords.escape(new_resource.parsed_server_root_password)
end
pass_string = '-p' + ::File.open('/etc/.mysql_root').read.chomp if ::File.exist?('/etc/.mysql_root')
pass_string
end
end
end
end