From 4980c723513e1573c156b60205a253aa9eaf2567 Mon Sep 17 00:00:00 2001 From: Johnny Hughes Date: Aug 13 2017 11:37:25 +0000 Subject: Add CentOS detection --- diff --git a/SOURCES/cloud-init-add-centos-os.patch b/SOURCES/cloud-init-add-centos-os.patch new file mode 100644 index 0000000..f69be69 --- /dev/null +++ b/SOURCES/cloud-init-add-centos-os.patch @@ -0,0 +1,31 @@ +diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py +index f56c0cf..1fd48a7 100755 +--- a/cloudinit/distros/__init__.py ++++ b/cloudinit/distros/__init__.py +@@ -32,7 +32,7 @@ from cloudinit.distros.parsers import hosts + + OSFAMILIES = { + 'debian': ['debian', 'ubuntu'], +- 'redhat': ['fedora', 'rhel'], ++ 'redhat': ['centos', 'fedora', 'rhel'], + 'gentoo': ['gentoo'], + 'freebsd': ['freebsd'], + 'suse': ['sles'], +diff --git a/cloudinit/distros/centos.py b/cloudinit/distros/centos.py +new file mode 100644 +index 0000000..4b803d2 +--- /dev/null ++++ b/cloudinit/distros/centos.py +@@ -0,0 +1,12 @@ ++# This file is part of cloud-init. See LICENSE file for license information. ++ ++from cloudinit.distros import rhel ++from cloudinit import log as logging ++ ++LOG = logging.getLogger(__name__) ++ ++ ++class Distro(rhel.Distro): ++ pass ++ ++# vi: ts=4 expandtab diff --git a/SPECS/cloud-init.spec b/SPECS/cloud-init.spec index 3c8e418..b79a940 100644 --- a/SPECS/cloud-init.spec +++ b/SPECS/cloud-init.spec @@ -44,6 +44,7 @@ Patch0019: 0019-Add-missing-sysconfig-unit-test-data.patch Patch0020: 0020-Fix-ipv6-subnet-detection.patch Patch0021: 0021-azure-ensure-that-networkmanager-hook-script-runs.patch Patch0022: 0022-RHEL-CentOS-Fix-default-routes-for-IPv4-IPv6-configu.patch +Patch9999: cloud-init-add-centos-os.patch # Deal with noarch -> arch # https://bugzilla.redhat.com/show_bug.cgi?id=1067089