mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
freebsdservice module python shell kwarg additions
This commit is contained in:
parent
a8f26aec90
commit
439e60f960
@ -64,7 +64,7 @@ def _get_rcvar(name):
|
||||
|
||||
cmd = '{0} {1} rcvar'.format(_cmd(), name)
|
||||
|
||||
for line in __salt__['cmd.run_stdout'](cmd).splitlines():
|
||||
for line in __salt__['cmd.run_stdout'](cmd, python_path=False).splitlines():
|
||||
if '_enable="' not in line:
|
||||
continue
|
||||
rcvar, _ = line.split('=', 1)
|
||||
@ -228,7 +228,7 @@ def enabled(name):
|
||||
|
||||
cmd = '{0} {1} rcvar'.format(_cmd(), name)
|
||||
|
||||
for line in __salt__['cmd.run_stdout'](cmd).splitlines():
|
||||
for line in __salt__['cmd.run_stdout'](cmd, python_shell=False).splitlines():
|
||||
if '_enable="' not in line:
|
||||
continue
|
||||
_, state, _ = line.split('"', 2)
|
||||
@ -308,7 +308,7 @@ def start(name):
|
||||
salt '*' service.start <service name>
|
||||
'''
|
||||
cmd = '{0} {1} onestart'.format(_cmd(), name)
|
||||
return not __salt__['cmd.retcode'](cmd)
|
||||
return not __salt__['cmd.retcode'](cmd, python_shell=False)
|
||||
|
||||
|
||||
def stop(name):
|
||||
@ -322,7 +322,7 @@ def stop(name):
|
||||
salt '*' service.stop <service name>
|
||||
'''
|
||||
cmd = '{0} {1} onestop'.format(_cmd(), name)
|
||||
return not __salt__['cmd.retcode'](cmd)
|
||||
return not __salt__['cmd.retcode'](cmd, python_shell=False)
|
||||
|
||||
|
||||
def restart(name):
|
||||
@ -336,7 +336,7 @@ def restart(name):
|
||||
salt '*' service.restart <service name>
|
||||
'''
|
||||
cmd = '{0} {1} onerestart'.format(_cmd(), name)
|
||||
return not __salt__['cmd.retcode'](cmd)
|
||||
return not __salt__['cmd.retcode'](cmd, python_shell=False)
|
||||
|
||||
|
||||
def reload_(name):
|
||||
@ -350,7 +350,7 @@ def reload_(name):
|
||||
salt '*' service.reload <service name>
|
||||
'''
|
||||
cmd = '{0} {1} onereload'.format(_cmd(), name)
|
||||
return not __salt__['cmd.retcode'](cmd)
|
||||
return not __salt__['cmd.retcode'](cmd, python_shell=False)
|
||||
|
||||
|
||||
def status(name, sig=None):
|
||||
@ -369,4 +369,4 @@ def status(name, sig=None):
|
||||
if sig:
|
||||
return bool(__salt__['status.pid'](sig))
|
||||
cmd = '{0} {1} onestatus'.format(_cmd(), name)
|
||||
return not __salt__['cmd.retcode'](cmd)
|
||||
return not __salt__['cmd.retcode'](cmd, python_shell=False)
|
||||
|
Loading…
Reference in New Issue
Block a user