Fix debian_service.get_disabled to subtract enabled from all

This commit is contained in:
Colton Myers 2013-02-15 16:11:14 -07:00
parent f37c738a26
commit 4dbd5b88b9

View File

@ -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():