old_contents: ####################################
  #
  # Keep all the constants used to
  # create glidein entries in this
  # module
  #
  # Author: Igor Sfiligoi
  #
  ####################################
  
  import os.path
  import cWConsts
  
  
  # these are in the stage dir, so they need to be renamed if changed
  AFTER_FILE_LISTFILE="after_"%cWConsts.FILE_LISTFILE
  
  CONDOR_FILE="condor_bin.tgz"
  CONDOR_DIR="condor"
  CONDOR_ATTR="CONDOR_DIR"
  
  CONDOR_STARTUP_FILE="condor_startup.sh"
  
  
  # these are in the submit dir, so they can be changed
  PARAMS_FILE="params.cfg"
  ATTRS_FILE="attributes.cfg"
  
  STARTUP_FILE="glidein_startup.sh"
  GLIDEIN_FILE="glidein.descript"
  JOB_DESCRIPT_FILE="job.descript"
  SUBMIT_FILE="job.condor"
  SUBMIT_WRAPPER="job_submit.sh"
  LOCAL_START_WRAPPER="local_start.sh"
  XML_CONFIG_FILE="glideinWMS.xml"
  INFOSYS_FILE="infosys.descript"
  RSA_KEY="rsa.key"
  
  INITD_STARTUP_FILE="factory_startup"
  
  ###################################################
  #
  # These functions append constant parts to strings
  #
  ###################################################
  
  def get_entry_submit_dir(submit_dir,entry_name):
      entry_submit_dir=os.path.join(submit_dir,"entry_"+entry_name)
      return entry_submit_dir
  
  def get_entry_name_from_entry_submit_dir(entry_submit_dir):
      entry_name_arr=os.path.basename(entry_submit_dir).split('_',1)
      if entry_name_arr[0]!='entry':
          raise ValueError('%s not a entry_submit_dir'%entry_submit_dir)
      return entry_name_arr[1]
  
  def get_entry_stage_dir(stage_dir,entry_name):
      entry_stage_dir=os.path.join(stage_dir,"entry_"+entry_name)
      return entry_stage_dir
  
  def get_entry_name_from_entry_stage_dir(entry_stage_dir):
      entry_name_arr=os.path.basename(entry_stage_dir).split('_',1)
      if entry_name_arr[0]!='entry':
          raise ValueError('%s not a entry_stage_dir'%entry_stage_dir)
      return entry_name_arr[1]
  
  def get_entry_monitor_dir(monitor_dir,entry_name):
      entry_monitor_dir=os.path.join(monitor_dir,"entry_"+entry_name)
      return entry_monitor_dir
  
  def get_entry_name_from_entry_monitor_dir(entry_monitor_dir):
      entry_name_arr=os.path.basename(entry_monitor_dir).split('_',1)
      if entry_name_arr[0]!='entry':
          raise ValueError('%s not a entry_monitor_dir'%entry_monitor_dir)
      return entry_name_arr[1]
  
  
  
new_contents: ####################################
  #
  # Keep all the constants used to
  # create glidein entries in this
  # module
  #
  # Author: Igor Sfiligoi
  #
  ####################################
  
  import os.path
  import cWConsts
  
  
  # these are in the stage dir, so they need to be renamed if changed
  AFTER_FILE_LISTFILE="after_%s"%cWConsts.FILE_LISTFILE
  
  CONDOR_FILE="condor_bin.tgz"
  CONDOR_DIR="condor"
  CONDOR_ATTR="CONDOR_DIR"
  
  CONDOR_STARTUP_FILE="condor_startup.sh"
  
  
  # these are in the submit dir, so they can be changed
  PARAMS_FILE="params.cfg"
  ATTRS_FILE="attributes.cfg"
  
  STARTUP_FILE="glidein_startup.sh"
  GLIDEIN_FILE="glidein.descript"
  JOB_DESCRIPT_FILE="job.descript"
  SUBMIT_FILE="job.condor"
  SUBMIT_WRAPPER="job_submit.sh"
  LOCAL_START_WRAPPER="local_start.sh"
  XML_CONFIG_FILE="glideinWMS.xml"
  INFOSYS_FILE="infosys.descript"
  RSA_KEY="rsa.key"
  
  INITD_STARTUP_FILE="factory_startup"
  
  ###################################################
  #
  # These functions append constant parts to strings
  #
  ###################################################
  
  def get_entry_submit_dir(submit_dir,entry_name):
      entry_submit_dir=os.path.join(submit_dir,"entry_"+entry_name)
      return entry_submit_dir
  
  def get_entry_name_from_entry_submit_dir(entry_submit_dir):
      entry_name_arr=os.path.basename(entry_submit_dir).split('_',1)
      if entry_name_arr[0]!='entry':
          raise ValueError('%s not a entry_submit_dir'%entry_submit_dir)
      return entry_name_arr[1]
  
  def get_entry_stage_dir(stage_dir,entry_name):
      entry_stage_dir=os.path.join(stage_dir,"entry_"+entry_name)
      return entry_stage_dir
  
  def get_entry_name_from_entry_stage_dir(entry_stage_dir):
      entry_name_arr=os.path.basename(entry_stage_dir).split('_',1)
      if entry_name_arr[0]!='entry':
          raise ValueError('%s not a entry_stage_dir'%entry_stage_dir)
      return entry_name_arr[1]
  
  def get_entry_monitor_dir(monitor_dir,entry_name):
      entry_monitor_dir=os.path.join(monitor_dir,"entry_"+entry_name)
      return entry_monitor_dir
  
  def get_entry_name_from_entry_monitor_dir(entry_monitor_dir):
      entry_name_arr=os.path.basename(entry_monitor_dir).split('_',1)
      if entry_name_arr[0]!='entry':
          raise ValueError('%s not a entry_monitor_dir'%entry_monitor_dir)
      return entry_name_arr[1]
  
  
  
subject: Fix typo