mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #2524 from archtaku/develop
Fix LSB distro detection
This commit is contained in:
commit
0f660b3644
@ -502,9 +502,11 @@ def os_data():
|
||||
# It's worth noting that Ubuntu has patched their Python distribution
|
||||
# so that platform.linux_distribution() does the /etc/lsb-release
|
||||
# parsing, but we do it anyway here for the sake for full portability.
|
||||
grains['osfullname'] = grains.get('lsb_distrib_id', osname)
|
||||
grains['osrelease'] = grains.get('lsb_distrib_release', osrelease)
|
||||
grains['oscodename'] = grains.get('lsb_distrib_codename', oscodename)
|
||||
grains['osfullname'] = grains.get('lsb_distrib_id', osname).strip()
|
||||
grains['osrelease'] = grains.get('lsb_distrib_release',
|
||||
osrelease).strip()
|
||||
grains['oscodename'] = grains.get('lsb_distrib_codename',
|
||||
oscodename).strip()
|
||||
# return the first ten characters with no spaces, lowercased
|
||||
shortname = grains['osfullname'].replace(' ', '').lower()[:10]
|
||||
# this maps the long names from the /etc/DISTRO-release files to the
|
||||
|
Loading…
Reference in New Issue
Block a user