Only remove the word linux from distroname when its not part of the name

This will now still replace "CentOS Linux" with "CentOS" while leaving "CloudLinux" unmodified.
Fixes #28951
This commit is contained in:
Massimiliano Torromeo 2016-02-04 13:47:59 +01:00 committed by rallytime
parent 35b7f62669
commit 885e00ba54

View file

@ -879,7 +879,7 @@ def id_():
'''
return {'id': __opts__.get('id', '')}
_REPLACE_LINUX_RE = re.compile(r'linux', re.IGNORECASE)
_REPLACE_LINUX_RE = re.compile(r'\Wlinux', re.IGNORECASE)
# This maps (at most) the first ten characters (no spaces, lowercased) of
# 'osfullname' to the 'os' grain that Salt traditionally uses.