#NEWLINE# def _sysv_services( ) : #NEWLINE# #INDENT# '\n    Return list of sysv services.\n    ' #NEWLINE# _services = [ ] #NEWLINE# output = __salt__ [ 'cmd.run' ] ( [ 'chkconfig' , '--list' ] , python_shell = False ) #NEWLINE# for line in output . splitlines ( ) : #NEWLINE# #INDENT# comps = line . split ( ) #NEWLINE# try : #NEWLINE# #INDENT# if comps [ 1 ] . startswith ( '0:' ) : #NEWLINE# #INDENT# _services . append ( comps [ 0 ] ) #NEWLINE# #UNINDENT# #UNINDENT# except IndexError : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# return [ x for x in _services if _service_is_sysv ( output ) ]