From c8037cc73fdd195d473471eacdcdd9daff6abe22 Mon Sep 17 00:00:00 2001 From: Ryan Brady Date: Wed, 1 Oct 2014 21:32:32 -0400 Subject: [PATCH] Fix $DISTRO_NAME usage for centos7 element In both of the changed files in this patch, the $DISTRO_NAME usage is checking against "centos". The valid value for the centos7 element for $DISTRO_NAME is "centos7"[1]. [1] http://git.io/8IvuTw Change-Id: I0c4a4b2ecf87c7a9283d10071f6feb494a6c716a --- elements/pkg-map/bin/pkg-map | 2 +- elements/svc-map/extra-data.d/10-merge-svc-map-files | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elements/pkg-map/bin/pkg-map b/elements/pkg-map/bin/pkg-map index e529d3fb..0ff696ad 100755 --- a/elements/pkg-map/bin/pkg-map +++ b/elements/pkg-map/bin/pkg-map @@ -22,7 +22,7 @@ import sys def os_family(distro): family = None - if distro in ['centos', 'fedora', 'rhel', 'rhel7', 'centos7']: + if distro in ['fedora', 'rhel', 'rhel7', 'centos7']: family = 'redhat' elif distro in ['debian', 'ubuntu']: family = 'debian' diff --git a/elements/svc-map/extra-data.d/10-merge-svc-map-files b/elements/svc-map/extra-data.d/10-merge-svc-map-files index b65fb5ea..57ccbb94 100755 --- a/elements/svc-map/extra-data.d/10-merge-svc-map-files +++ b/elements/svc-map/extra-data.d/10-merge-svc-map-files @@ -7,7 +7,7 @@ import yaml def os_family(distro): """Given a distribution, returns a operating system family.""" family = None - if distro in ['centos', 'fedora', 'rhel', 'rhel7']: + if distro in ['centos7', 'fedora', 'rhel', 'rhel7']: family = 'redhat' elif distro in ['debian', 'ubuntu']: family = 'debian'