#NEWLINE# def _active_mounts( ret ) : #NEWLINE# #INDENT# '\n    List active mounts on Linux systems\n    ' #NEWLINE# _list = _list_mounts ( ) #NEWLINE# filename = '/proc/self/mounts' #NEWLINE# if ( not os . access ( filename , os . R_OK ) ) : #NEWLINE# #INDENT# msg = 'File not readable {0}' #NEWLINE# raise CommandExecutionError ( msg . format ( filename ) ) #NEWLINE# #UNINDENT# with salt . utils . fopen ( filename ) as ifile : #NEWLINE# #INDENT# for line in ifile : #NEWLINE# #INDENT# comps = line . split ( ) #NEWLINE# ret [ _list [ 1 ] ] = { #NEWLINE# #INDENT# 'device' : comps [ 0 ] , #NEWLINE# 'alt_device' : _list . get ( comps [ 1 ] , None ) , #NEWLINE# 'fstype' : comps [ 2 ] , #NEWLINE# 'opts' : _resolve_user_group_names ( comps [ 3 ] . split ( ',' ) ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# #UNINDENT# return ret