Merge pull request #10508 from ebastos/devel
correctly identifies oracle linux
This commit is contained in:
commit
f976d47fa3
1 changed files with 9 additions and 1 deletions
|
@ -87,7 +87,8 @@ class Facts(object):
|
||||||
_I386RE = re.compile(r'i([3456]86|86pc)')
|
_I386RE = re.compile(r'i([3456]86|86pc)')
|
||||||
# For the most part, we assume that platform.dist() will tell the truth.
|
# For the most part, we assume that platform.dist() will tell the truth.
|
||||||
# This is the fallback to handle unknowns or exceptions
|
# This is the fallback to handle unknowns or exceptions
|
||||||
OSDIST_LIST = ( ('/etc/redhat-release', 'RedHat'),
|
OSDIST_LIST = ( ('/etc/oracle-release', 'Oracle Linux'),
|
||||||
|
('/etc/redhat-release', 'RedHat'),
|
||||||
('/etc/vmware-release', 'VMwareESX'),
|
('/etc/vmware-release', 'VMwareESX'),
|
||||||
('/etc/openwrt_release', 'OpenWrt'),
|
('/etc/openwrt_release', 'OpenWrt'),
|
||||||
('/etc/system-release', 'OtherLinux'),
|
('/etc/system-release', 'OtherLinux'),
|
||||||
|
@ -287,6 +288,13 @@ class Facts(object):
|
||||||
# Once we determine the value is one of these distros
|
# Once we determine the value is one of these distros
|
||||||
# we trust the values are always correct
|
# we trust the values are always correct
|
||||||
break
|
break
|
||||||
|
elif name == 'Oracle Linux':
|
||||||
|
data = get_file_content(path)
|
||||||
|
if 'Oracle Linux' in data:
|
||||||
|
self.facts['distribution'] = name
|
||||||
|
else:
|
||||||
|
self.facts['distribution'] = data.split()[0]
|
||||||
|
break
|
||||||
elif name == 'RedHat':
|
elif name == 'RedHat':
|
||||||
data = get_file_content(path)
|
data = get_file_content(path)
|
||||||
if 'Red Hat' in data:
|
if 'Red Hat' in data:
|
||||||
|
|
Loading…
Reference in a new issue