Merge pull request #18163 from cachedout/keyboard_quote

Set shell on keyboard module calls
This commit is contained in:
Thomas S Hatch 2014-11-17 21:05:28 -07:00
commit 7c186693ae

View File

@ -38,7 +38,7 @@ def get_sys():
cmd = 'grep XKBLAYOUT /etc/default/keyboard | grep -vE "^#"'
elif 'Gentoo' in __grains__['os_family']:
cmd = 'grep "^keymap" /etc/conf.d/keymaps | grep -vE "^#"'
out = __salt__['cmd.run'](cmd).split('=')
out = __salt__['cmd.run'](cmd, python_shell=True).split('=')
ret = out[1].replace('"', '')
return ret
@ -81,7 +81,7 @@ def get_x():
salt '*' keyboard.get_x
'''
cmd = 'setxkbmap -query | grep layout'
out = __salt__['cmd.run'](cmd).split(':')
out = __salt__['cmd.run'](cmd, python_shell=True).split(':')
return out[1].strip()