Skip to content

Commit

Permalink
fix default params for SUSE family OSes
Browse files Browse the repository at this point in the history
- remove the old openSUSE 13.2
- add default value '94' to cover all the recent and supported openSUSE distros
- use the old initscript for SLE 11 SPx, systemd commands for anything else
  • Loading branch information
tampakrap committed Mar 11, 2017
1 parent dd14e20 commit b6fbbb3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions manifests/globals.pp
Expand Up @@ -111,10 +111,10 @@
'Suse' => $::operatingsystem ? {
'SLES' => $::operatingsystemrelease ? {
/11\.[0-4]/ => '91',
default => '93',
default => '94',
},
'OpenSuSE' => $::operatingsystemrelease ? {
'13.2' => '93',
default => '94',
},
default => undef,
},
Expand Down
9 changes: 7 additions & 2 deletions manifests/params.pp
Expand Up @@ -278,8 +278,13 @@
$bindir = pick($bindir, "/usr/lib/postgresql${version}/bin")
$datadir = pick($datadir, '/var/lib/pgsql/data')
$confdir = pick($confdir, $datadir)
$service_status = pick($service_status, "/etc/init.d/${service_name} status")
$service_reload = "/etc/init.d/${service_name} reload"
if $::operatingsystem == 'SLES' and versioncmp($::operatingsystemrelease, 11.4) <= 0 {
$service_status = pick($service_status, "/etc/init.d/${service_name} status")
$service_reload = "/etc/init.d/${service_name} reload"
} else {
$service_status = pick($service_status, "systemctl status ${service_name}")
$service_reload = "systemctl reload ${service_name}"
}
$psql_path = pick($psql_path, "${bindir}/psql")

$needs_initdb = pick($needs_initdb, true)
Expand Down

0 comments on commit b6fbbb3

Please sign in to comment.