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

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