From b0da4592487ec44c56bb4f6bfb51d2f13d4f6265 Mon Sep 17 00:00:00 2001 From: Jeffrey Jones Date: Wed, 20 Nov 2013 19:10:26 -0500 Subject: [PATCH] [COOK-2954] Support Installing non-standard versions on CentOS 6 Signed-off-by: Sean OMeara --- attributes/default.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/attributes/default.rb b/attributes/default.rb index e6e17b720..ce2361464 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -101,7 +101,7 @@ default['postgresql']['version'] = "8.4" default['postgresql']['dir'] = "/var/lib/pgsql/data" - if node['platform_version'].to_f >= 6.0 + if node['platform_version'].to_f >= 6.0 && node['postgresql']['version'] == '8.4' default['postgresql']['client']['packages'] = %w{postgresql-devel} default['postgresql']['server']['packages'] = %w{postgresql-server} default['postgresql']['contrib']['packages'] = %w{postgresql-contrib} @@ -110,7 +110,14 @@ default['postgresql']['server']['packages'] = ["postgresql#{node['postgresql']['version'].split('.').join}-server"] default['postgresql']['contrib']['packages'] = ["postgresql#{node['postgresql']['version'].split('.').join}-contrib"] end - default['postgresql']['server']['service_name'] = "postgresql" + + if node['platform_version'].to_f >= 6.0 && node['postgresql']['version'] != '8.4' + default['postgresql']['dir'] = "/var/lib/pgsql/#{node['postgresql']['version']}/data" + default['postgresql']['server']['service_name'] = "postgresql-#{node['postgresql']['version']}" + else + default['postgresql']['dir'] = "/var/lib/pgsql/data" + default['postgresql']['server']['service_name'] = "postgresql" + end when "suse"