PROCEDURE (hidden) rap$perform_installation_option (
  installation_parameters, ip: (VAR) ..
*copy rat$installation_parameters
                                  = $required
  status)


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

" PURPOSE:
"   This procedure performs the requested installation option.
"
" NOTES:
"   $SYSTEM.$VALIDATIONS file cycle number changed to be greater
"     than 1 on INISD deadstarts where the Installation Tape is loaded.
"     This is done to avoid cycle conflicts on reload deadstarts.
*IFEND


  "$FORMAT=OFF
  VAR
    ignore_status: status
    installation_status: status
    local_status: status
    osv$deadstart_phase: (XREF) string 0 .. $max_name
  VAREND
  "$FORMAT=ON"


  IF osv$deadstart_phase = 'INSTALL' THEN
    IF $file($system.$validations, cycle_number) = 1 THEN
      $system.change_catalog_entry f=$system.$validations nc=2 status=ignore_status
    IFEND
  IFEND

  IF installation_parameters.installation_option = 'INSTALLATION_TAPE' THEN

    rap$install_installation_tape ip=installation_parameters status=installation_status

    IF installation_status.normal THEN
      IF (osv$deadstart_phase = 'INSTALL') AND ..
            (installation_parameters.activation_option = 'MANUAL') THEN
        rap$get_activation_option menu_module=inidd_activation ao=installation_parameters.activation_option
      IFEND
    ELSE
      installation_parameters.activation_option = 'CONSOLE'
    IFEND

  ELSE

    rap$install_deferred_products status=installation_status

    IF installation_status.normal THEN
      rap$get_activation_option menu_module=deferred_activation ao=installation_parameters.activation_option
    ELSE
      installation_parameters.activation_option = 'CONSOLE'
    IFEND
  IFEND

  EXIT procedure WITH installation_status WHEN NOT installation_status.normal

PROCEND rap$perform_installation_option
