mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Fix debian_service.get_disabled to subtract enabled from all
This commit is contained in:
parent
f37c738a26
commit
4dbd5b88b9
@ -52,12 +52,7 @@ def get_disabled():
|
||||
|
||||
salt '*' service.get_disabled
|
||||
'''
|
||||
prefix = '/etc/rc{0}.d/K'.format(_get_runlevel())
|
||||
ret = set()
|
||||
lines = glob.glob('{0}*'.format(prefix))
|
||||
for line in lines:
|
||||
ret.add(re.split(prefix + '\d+', line)[1])
|
||||
return sorted(ret)
|
||||
return sorted(set(get_all()) - set(get_enabled()))
|
||||
|
||||
|
||||
def get_all():
|
||||
|
Loading…
Reference in New Issue
Block a user