mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Update grains (typo) and remove trailing whitepsace in yumpkg.py
This commit is contained in:
parent
ec9740e229
commit
70ccd564f6
@ -755,12 +755,14 @@ _OS_FAMILY_MAP = {
|
||||
'Raspbian': 'Debian'
|
||||
}
|
||||
|
||||
|
||||
def _linux_bin_exists(bin):
|
||||
'''
|
||||
Does a binary exist in linux (depends on which)
|
||||
'''
|
||||
return __salt__['cmd.run']('which {0} > /dev/null; echo $?'.format(bin)) == '0'
|
||||
|
||||
|
||||
def os_data():
|
||||
'''
|
||||
Return grains pertaining to the operating system
|
||||
@ -791,7 +793,7 @@ def os_data():
|
||||
if _linux_bin_exists('selinuxenabled'):
|
||||
grains['selinux'] = {}
|
||||
grains['selinux']['enabled'] = __salt__['cmd.run']('selinuxenabled; echo $?').strip() == '0'
|
||||
if _linux_bin_exists('getenforcde'):
|
||||
if _linux_bin_exists('getenforce'):
|
||||
grains['selinux']['enforced'] = __salt__['cmd.run']('getenforce').strip()
|
||||
|
||||
# Add lsb grains on any distro with lsb-release
|
||||
|
@ -1299,4 +1299,3 @@ def expand_repo_def(repokwargs):
|
||||
'''
|
||||
# YUM doesn't need the data massaged.
|
||||
return repokwargs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user