Fix alternative module and state.

This commit is contained in:
Jacek Hojczak 2016-02-11 09:39:29 +01:00
parent 825b510030
commit 0e68fafb74
2 changed files with 2 additions and 2 deletions

View file

@ -92,7 +92,7 @@ def check_exists(name, path):
salt '*' alternatives.check_exists name path
'''
cmd = [_get_cmd(), '--list', name]
cmd = [_get_cmd(), '--display', name]
out = __salt__['cmd.run_all'](cmd, python_shell=False)
if out['retcode'] > 0 and out['stderr'] != '':

View file

@ -62,7 +62,7 @@ def install(name, link, path, priority):
'changes': {},
'comment': ''}
isinstalled = __salt__['alternatives.check_exists'](name, path)
isinstalled = __salt__['alternatives.check_installed'](name, path)
if not isinstalled:
if __opts__['test']:
ret['comment'] = (