Update grains (typo) and remove trailing whitepsace in yumpkg.py

This commit is contained in:
Thomas Jackson 2014-01-15 14:25:56 -08:00
parent ec9740e229
commit 70ccd564f6
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -1299,4 +1299,3 @@ def expand_repo_def(repokwargs):
'''
# YUM doesn't need the data massaged.
return repokwargs