PROC boot_upgrade_software (
  status : var of status = $optional
  )


*IF $variable(rav$proc_doc,declared)<>'UNKNOWN'

"     The purpose of this procedure is to setup the environment for the UPGRADE SOFTWARE utility
"to execute and install the BASE_1 tape.  This procedure is called by INSTALL_REQUIRED_FILES.
*IFEND


  create_variable ignore_status kind=status
  create_variable local_status kind=status


boot_block: ..
  BLOCK

    detach_file $local.raf$library status=ignore_status
    copy_file $system.software_maintenance.installation_catalog.raf$library $local.raf$library ..
          status=local_status
    EXIT boot_block WHEN NOT local_status.normal

    detach_file $local.cyf$run_time_library status=ignore_status
    copy_file $system.software_maintenance.installation_catalog.cyf$run_time_library ..
          $local.cyf$run_time_library status=local_status
    EXIT boot_block WHEN NOT local_status.normal

    detach_file $local.smf$library status=ignore_status
    copy_file $system.software_maintenance.installation_catalog.smf$library $local.smf$library ..
          status=local_status
    EXIT boot_block WHEN NOT local_status.normal

    detach_file $local.aaf$44d_library status=ignore_status
    copy_file $system.software_maintenance.installation_catalog.aaf$44d_library $local.aaf$44d_library ..
          status=local_status
    EXIT boot_block WHEN NOT local_status.normal

    detach_file $local.aaf$4dd_library status=ignore_status
    copy_file $system.software_maintenance.installation_catalog.aaf$4dd_library $local.aaf$4dd_library ..
          status=local_status
    EXIT boot_block WHEN NOT local_status.normal

    detach_file $local.mlf$library status=ignore_status
    copy_file $system.software_maintenance.installation_catalog.mlf$library $local.mlf$library ..
          status=local_status
    EXIT boot_block WHEN NOT local_status.normal

    copy_file $system.software_maintenance.installation_catalog.installation_table ..
          $system.software_maintenance.installation_table status=local_status
    EXIT boot_block WHEN NOT local_status.normal

    change_file_attributes $local.aaf$44d_library ring_attributes=(4 4 13)
    change_file_attributes $local.aaf$4dd_library ring_attributes=(4 13 13)
    change_file_attributes $local.mlf$library ring_attributes=(4 13 13)

  BLOCKEND boot_block

  EXIT_PROC WITH local_status WHEN NOT local_status.normal

PROCEND boot_upgrade_software
