DRY: Get all service FMRIs and their enabled property

def _get_enabled_disabled(enabled_prop="true"):
    '''
    DRY: Get all service FMRIs and their enabled property
    '''
    ret = set()
    cmd = '/usr/bin/svcprop -c -p general/enabled "*"'
    lines = __salt__['cmd.run_stdout'](cmd, python_shell=False).splitlines()
    for line in lines:
        comps = line.split()
        if not comps:
            continue
        if comps[2] == enabled_prop:
            ret.add(comps[0].split("/:properties")[0])
    return sorted(ret)