def available():
 ret = []
 mod_dir = os.path.join('/lib/modules/', os.uname()[2])
 for (root, dirs, files) in os.walk(mod_dir):
  for fn_ in files:
   if ('.ko' in fn_):
    ret.append(fn_[:fn_.index('.ko')].replace('-', '_'))
 if ('Arch' in __grains__['os_family']):
  mod_dir_arch = (('/lib/modules/extramodules-' + os.uname()[2][0:3]) + '-ARCH')
  for (root, dirs, files) in os.walk(mod_dir_arch):
   for fn_ in files:
    if ('.ko' in fn_):
     ret.append(fn_[:fn_.index('.ko')].replace('-', '_'))
 return sorted(list(ret))

def available ( ) : ret = [ ] mod_dir = os . path . join ( '/lib/modules/' , os . uname ( ) [ 2 ] ) for ( root , dirs , files ) in os . walk ( mod_dir ) : for fn_ in files : if ( '.ko' in fn_ ) : ret . append ( fn_ [ : fn_ . index ( '.ko' ) ] . replace ( '-' , '_' ) ) if ( 'Arch' in __grains__ [ 'os_family' ] ) : mod_dir_arch = ( ( '/lib/modules/extramodules-' + os . uname ( ) [ 2 ] [ 0 : 3 ] ) + '-ARCH' ) for ( root , dirs , files ) in os . walk ( mod_dir_arch ) : for fn_ in files : if ( '.ko' in fn_ ) : ret . append ( fn_ [ : fn_ . index ( '.ko' ) ] . replace ( '-' , '_' ) ) return sorted ( list ( ret ) )
returns true if the specified service is available .