Add __cli opt

Allows us to know what CLI command we are operating under. Especially useful for detecting uses of salt-call
This commit is contained in:
Mike Place 2015-10-23 12:42:00 -06:00
parent 0fa094ae11
commit a2408157de

View file

@ -1979,6 +1979,8 @@ def apply_minion_config(overrides=None,
if overrides:
opts.update(overrides)
opts['__cli'] = os.path.basename(sys.argv[0])
if len(opts['sock_dir']) > len(opts['cachedir']) + 10:
opts['sock_dir'] = os.path.join(opts['cachedir'], '.salt-unix')