Skip to content

Commit b6fbbb3

Browse files
committed
fix default params for SUSE family OSes
- 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
1 parent dd14e20 commit b6fbbb3

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

manifests/globals.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@
111111
'Suse' => $::operatingsystem ? {
112112
'SLES' => $::operatingsystemrelease ? {
113113
/11\.[0-4]/ => '91',
114-
default => '93',
114+
default => '94',
115115
},
116116
'OpenSuSE' => $::operatingsystemrelease ? {
117-
'13.2' => '93',
117+
default => '94',
118118
},
119119
default => undef,
120120
},

manifests/params.pp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,13 @@
278278
$bindir = pick($bindir, "/usr/lib/postgresql${version}/bin")
279279
$datadir = pick($datadir, '/var/lib/pgsql/data')
280280
$confdir = pick($confdir, $datadir)
281-
$service_status = pick($service_status, "/etc/init.d/${service_name} status")
282-
$service_reload = "/etc/init.d/${service_name} reload"
281+
if $::operatingsystem == 'SLES' and versioncmp($::operatingsystemrelease, 11.4) <= 0 {
282+
$service_status = pick($service_status, "/etc/init.d/${service_name} status")
283+
$service_reload = "/etc/init.d/${service_name} reload"
284+
} else {
285+
$service_status = pick($service_status, "systemctl status ${service_name}")
286+
$service_reload = "systemctl reload ${service_name}"
287+
}
283288
$psql_path = pick($psql_path, "${bindir}/psql")
284289

285290
$needs_initdb = pick($needs_initdb, true)

0 commit comments

Comments
 (0)