From 445b926959658371789666c46899fb3cb2bcd2e6 Mon Sep 17 00:00:00 2001 From: Gael Chamoulaud Date: Wed, 9 Jul 2014 10:22:17 +0200 Subject: [PATCH] Fixes Facts string comparisons in CentOS 7 - CentOS Project has adopted a new rule for versioning numbers. The major number matches the RHEL major number, but the minor number is generated from the release date. For example, CentOS 7.1407. - Adds support for Scientific Linux. Change-Id: I183dd8e0a019d5fb486e8f0641f6ab81ae758f8f Closes-Bug: 1338777 Signed-off-by: Gael Chamoulaud (cherry picked from commit c18884bdb9b47f1c23f9a728a5ff6c4c66a1801a) --- manifests/params.pp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 9d5da31b..77f01528 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -40,10 +40,17 @@ $ceph_init_override = '/etc/sysconfig/openstack-cinder-volume' $lio_package_name = 'targetcli' - if $::operatingsystem == 'RedHat' and $::operatingsystemrelease >= 7 { - $iscsi_helper = 'lioadm' - } else { - $iscsi_helper = 'tgtadm' + case $::operatingsystem { + 'RedHat', 'CentOS', 'Scientific': { + if $::operatingsystemmajrelease >= 7 { + $iscsi_helper = 'lioadm' + } else { + $iscsi_helper = 'tgtadm' + } + } + default: { + $Iscsi_helper = 'tgtadm' + } } } else {