| ... | ... |
@@ -99,8 +99,9 @@ class Facts(object): |
| 99 | 99 |
('/etc/os-release', 'SuSE'),
|
| 100 | 100 |
('/etc/gentoo-release', 'Gentoo'),
|
| 101 | 101 |
('/etc/os-release', 'Debian'),
|
| 102 |
+ ('/etc/lsb-release', 'Mandriva'),
|
|
| 102 | 103 |
('/etc/os-release', 'NA'),
|
| 103 |
- ('/etc/lsb-release', 'Mandriva'))
|
|
| 104 |
+ ) |
|
| 104 | 105 |
SELINUX_MODE_DICT = { 1: 'enforcing', 0: 'permissive', -1: 'disabled' }
|
| 105 | 106 |
|
| 106 | 107 |
# A list of dicts. If there is a platform with more than one |
| ... | ... |
@@ -416,11 +417,13 @@ class Facts(object): |
| 416 | 416 |
self.facts['distribution_version'] = self.facts['distribution_version'] + '.' + release.group(1) |
| 417 | 417 |
elif name == 'Debian': |
| 418 | 418 |
data = get_file_content(path) |
| 419 |
- if 'Debian' in data or 'Raspbian' in data: |
|
| 419 |
+ if 'Ubuntu' in data: |
|
| 420 |
+ break # Ubuntu gets correct info from python functions |
|
| 421 |
+ elif 'Debian' in data or 'Raspbian' in data: |
|
| 420 | 422 |
release = re.search("PRETTY_NAME=[^(]+ \(?([^)]+?)\)", data)
|
| 421 | 423 |
if release: |
| 422 | 424 |
self.facts['distribution_release'] = release.groups()[0] |
| 423 |
- break |
|
| 425 |
+ break |
|
| 424 | 426 |
elif name == 'Mandriva': |
| 425 | 427 |
data = get_file_content(path) |
| 426 | 428 |
if 'Mandriva' in data: |