From 4ea01996296a668431f932c290ed9bee79776c05 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Sun, 22 Nov 2015 01:55:04 +0100 Subject: xymon: use xymon service name instead of xymon-client on Mageia >= 5 --- modules/xymon/manifests/client.pp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/xymon/manifests/client.pp b/modules/xymon/manifests/client.pp index 551d5775..890430c6 100644 --- a/modules/xymon/manifests/client.pp +++ b/modules/xymon/manifests/client.pp @@ -1,7 +1,13 @@ class xymon::client { package { 'xymon-client': } - service { 'xymon-client': + if versioncmp($::lsbdistrelease, '5') < 0 { + $service = 'xymon-client' + } else { + $service = 'xymon' + } + + service { $service: hasstatus => false, status => "${::lib_dir}/xymon/client/runclient.sh status", require => Package['xymon-client'], @@ -11,7 +17,7 @@ class xymon::client { $server = extlookup('hobbit_server','x') file { '/etc/sysconfig/xymon-client': content => template('xymon/xymon-client'), - notify => Service['xymon-client'], + notify => Service[$service], require => Package['xymon-client'], } } -- cgit v1.2.1