def _upstart_is_disabled(name):
 files = ['/etc/init/{0}.conf'.format(name), '/etc/init/{0}.override'.format(name)]
 for file_name in itertools.ifilter(os.path.isfile, files):
  with salt.utils.fopen(file_name) as fp_:
   if re.search('^\\s*manual', fp_.read(), re.MULTILINE):
    return True
 return False

def _upstart_is_disabled ( name ) : files = [ '/etc/init/{0}.conf' . format ( name ) , '/etc/init/{0}.override' . format ( name ) ] for file_name in itertools . ifilter ( os . path . isfile , files ) : with salt . utils . fopen ( file_name ) as fp_ : if re . search ( '^\\s*manual' , fp_ . read ( ) , re . MULTILINE ) : return True return False
an upstart service is assumed disabled if a manual stanza is placed in /etc/init/[name] .