Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ updatep(1) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

installp

bffcreate

discussion of updating

updatep

PURPOSE

     Updates one or more programs.

SYNOPSIS
     updatep [[-a][-ac][-acl][-al][-s][-r][-rx][-c]] [-n user] [-d device]

DESCRIPTION

     Warning:  Before you apply or  reject an update, you must
     restart your system and be  sure that you are not running
     any programs and that no other work stations are enabled.

     The updatep  command controls the update  process for one
     or more programs.  It also lets you  determine the status
     of  pending program  updates  and provides  documentation
     about the  updates.  You must  be a member of  the system
     group or  operating with superuser authority  to run this
     command.

     The updatep command  supports an apply/commit/reject phi-
     losophy.  To apply  one or more programs, you  use the -a
     or the -ai  flags.  You must then use either  the -c flag
     to  commit the  program  or  the -r  flag  to reject  the
     program.  Normally you  should not use -r  until you have
     tested the program on your system.  If you specify -ac or
     -aci, you can apply and  commit in one operation.  The -r
     flag must  be used separately.  During  an apply, updatep
     normally  saves the  current versions  of files  that are
     being updated.  If needed, these  files can be used to do
     a recovery or reject.

     You are  responsible for  reserving update save  space in
     the  /usr file  system.   updatep checks  to insure  that
     there is adequate save space in /usr before it applies an
     update.   If there  is insufficient  free space,  updatep
     gives you the  option of either ending the  command or of
     allowing it to continue.  If you end the command, you can
     take action to increase the  free space in your /usr file
     system.  If  you continue,  no current versions  of files
     will be saved, and  updatep will automatically commit the
     update, even though  you may not have  requested a commit
     originally.  Normally, you should  reserve 4000 blocks (2
     megabytes)  of free  space in  the /usr  file system  for
     updates.

     You cannot use INTERRUPT  (Alt-Pause) to stop the updatep
     command.  To stop updatep, press QUIT WITH DUMP (Ctrl-V).
     This should  be used only in  extreme circumstances since
     the  state  of  the  system  cannot  be  predicted.   For
     example:

     o   The write-verify feature may be left on for all mini-
         disks.  See "verify."
     o   All terminals other than the console may be disabled.
         See "pstart, penable, pshare, pdelay."
     o   Some update control files may need to be deleted.

FLAGS

     -a[i]      Applies the updates for  one or more programs.
                If there  is a pending update  for any program
                on  the system,  updatep  does  not permit  an
                apply.  You  must either commit or  reject all
                pending  updates  before  it  accepts  another
                update apply.

                The  updatep command  asks you  to select  the
                program you wish to  update.  After you select
                a  program, updatep  runs the  inudocm command
                for any  specific update instructions.   If it
                finds  any,  it  copies  them  into  the  file
                /usr/lpp/pgm-name/ui.vv.rr.llll., where  vv is
                the  version, rr  the  release,  and llll  the
                level  of the  program.   Normally you  should
                review  instructions  before  continuing.   To
                restart  the update  procedure and  ignore the
                check for existing  update instructions, enter
                updatep -ai or updatep -aci.

                The  updatep command  applies  the update  for
                each program by running inuupdt for each name.
                After    each   update,    it   deletes    the
                /usr/lpp/pgm-name/inst_updt   directory.    It
                then runs inudocm to check for any update doc-
                umentation.   If there  is  information for  a
                manual,  updatep  copies   it  into  the  file
                /usr/lpp/pgm-name/me.vv.rr.lll  and  writes  a
                message.
     -b         Runs the bffcreate command  to create a backup
                format file from the distribution media.  Then
                tells updatep  to use  the backup file  as the
                distribution media  for the update.   Use this
                flag to update in a code service environment.
     -c         Commits a previous update apply.  updatep pre-
                sents selection information  for programs that
                have pending updates.  You select the programs
                that you want to commit.

                Any programs that you apply as a group must be
                committed  as  a  group.   Management  control
                information about the  update changes to indi-
                cate that  the program is  committed.  updatep
                deletes the directory that contains the update
                recovery                          information,
                /usr/lpp/pgm-name/inst_updt.save.
     -d device  Specifies the input  device name.  The default
                input device is /dev/rfd0.
     -n user    Lets you specify a name in the program history
                file that is responsible for the program.  The
                default is  the value  of the  system variable
                $LOGNAME.  If  you specify  user, the  first 8

                nonblank characters are  stored in the program
                history file.
     -q         Runs  in quiet  mode suppressing  most of  the
                interactive queries.
     -r         Rejects  a previous  update apply  for one  or
                more  programs.   updatep  presents  selection
                information for the programs that have pending
                updates.  You select the programs to reject.

                Any programs that are  grouped together by the
                system must be rejected or applied as a group.
                Specify -r  without -x  if you  want automatic
                recovery of  saved files.   If you  do specify
                the -x  flag, the management  control informa-
                tion about the update reflects that the update
                is  rejected,  but  updatep does  not  recover
                saved files.  To  recover the necessary files,
                look      at      the      information      in
                /usr/lpp/pgm-name/inst_updt.save.   This  flag
                should be used only by someone very knowledge-
                able about the system.
     -s         Writes  status information  about all  pending
                program updates.
     -x         Cancels the automatic  recovery of saved files
                (use with -r).

     The  updatep command  receives the  following exit  codes
     indirectly from update through inuupdt:

     0  Normal return, no errors indicated.
     2  Use  the  sync command  to  update  the super  blocks,
        i-nodes, and  delayed block  I/O and then  restart the
        VRM.
     3  Build  the   kernel,  then  update   the  superblocks,
        i-nodes, and  delayed block  I/O (sync) and  shut down
        the VRM.
     4  Use the  cfgaply subroutine to build  the kernel.  Use
        the sync command to  update the super blocks, i-nodes,
        and delayed block I/O and then restart the VRM.
     5  Installation cancelled without errors.
     6  Update  superblocks, i-nodes,  and  delayed block  I/O
        (sync), then shut down the VRM.
     7  Update cancelled by update procedure, recovery needed.

     If it receives any other  exit code, it runs the recovery
     function inurecv.   If the system cannot  run updatep, it
     returns an exit code of 1.

INTERNAL COMMANDS

     The updatep  command uses the inudocm  command for update
     documentation control.   It uses  the inuupdt  command to
     apply  an update  to a  single program.   inuupdt runs  a
     program-provided   update  procedure,   update.   updatep
     passes the following parameters to the update procedure:

     o   The full path name of the apply-list.
     o   The full  path name  of the  device (file)  where the
         update information is stored in backup format.

     In  addition to  the  commands  discussed here,  program-
     provided update  procedures can  use all of  the internal
     commands  discussed  under  "installp."  Since  they  are
     internal commands,  they do  minimum validation  of input
     parameters.  Their purpose is  to provide common code for
     functions frequently needed by most program-provided pro-
     cedures.  Since these internal  commands function as sub-
     commands, they return exit values rather than issue error
     messages.  However,  messages may come from  other system
     commands that they run.  C Language programmers of update
     procedures  that   call  these   commands  can   use  the
     /usr/include/inu21.h file to define  the return codes for
     them.

       inudocm

     The  inudocm  command is  normally  used  as an  internal
     command to get copies  of specific update instructions or
     manual errata information that  you can print out.  There
     may be cases, however, when  you would enter this command
     from the command line (for example, if you have misplaced
     the manual  errata information that came  with a previous
     update).  You  must be  a member of  the system  group or
     operating with superuser authority to run this command.

     The inudocm command has the following syntax:

         inudocm -eu  [-d device]  [pgm-name]  [level]  [-f file]

     where pgm-name  specifies the  name of the  program being
     checked.   It must  be specified  unless you  use the  -f
     flag.  It can be a maximum of 8 characters.  level speci-
     fies the current  level of pgm-name.  This  value must be
     identical to the level value for the last committed entry
     in  /usr/lpp/pgm-name/lpp.hist.   It  must  be  specified
     unless you use the -f flag.

     FLAGS

     -d device
            Restores file  from this  device.  device  must be
            the full path name of  a device special file.  The
            default device is /dev/rfd0.  You must not specify
            this flag if you use the -f flag.
     -e     Requests the existing  update documentation infor-
            mation  for pgm-name  from level.   If you  select
            this  flag,  inudocm  uses  the ar  x  command  to
            extract          the         archive          file
            /usr/sys/inst_updt/pgm-name_erata.  (If  this file
            is  not  present,  no information  is  available.)
            inudocm extracts any level-dependent manual errata
            information  files if  there are  any more  recent
            than the current level.   Selected files are moved
            to /usr/lpp/pgm-name/me.vv.rr.llll.
     -f  file
            Identifies  a  file   that  already  contains  the
            pgm-name  and  the  level.   Only  updatep  itself
            should use this flag.

     -u     Requests the existing specific update instructions
            for pgm-name from level.  If you select this flag,
            inudocm  uses  the ar  x  command  to extract  the
            archive   file  /usr/sys/inst_updt/pgm-name_instr.
            (If this  file is  not present, no  information is
            available.)  inudocm  extracts any level-dependent
            specific update instruction files if there are any
            more  recent  than  the current  level.   Selected
            files            are           moved            to
            /usr/lpp/pgm-name/ui.vv.rr.llll.

     The inudocm command returns the following exit values:

     0  Normal return, no error occurred.
     1  The system cannot run inudocm.
     2  Specific update  instruction files were  requested but
        not found.
     4  Manual errata information was requested, but none were
        found.
     6  Specific  update instructions  and manual  errata were
        both requested but not found.
     201 An invalid flag was  specified, or the first argument
        was not -e, -eu, or -u.
     202 One or more parameters were missing.
     204 Too many parameters were entered.
     250 The level parameter did not contain exactly 4 charac-
        ters, or they were not numeric.
     251  An  error  occurred   while  attempting  to  restore
        /usr/sys/inst_updt/control.
     253 The directory /usr/lpp/pgm-name does not exist.

       inuupdt

     The  inuupdt  command  provides a  common  interface  for
     applying  an  update  to  a  single  program.   Normally,
     updatep runs inuupdt.

     The inuupdt command has the following format:

         inuupdt  -d device  current-level new-level  pgm-name

     where pgm-name is the name of a program and current-level
     specifies  the current  maintenance level.   new-level is
     the level of the update to be applied.  pgm-name can be a
     maximum of  8 characters and current-level  must be iden-
     tical     to      the     level     value      in     the
     /usr/lpp/pgm-name/lpp.hist file.

     The inuupdt  command passes the following  exit values to
     the process that called it:

     0         Normal return.
     2         Use  the  sync  command  to  update  the  super
               blocks, i-nodes, and delayed block I/O and then
               restart the VRM.
     3         Build the kernel,  then update the superblocks,
               i-nodes, and delayed block  I/O (sync) and shut
               down the VRM.

     4         Use the cfgaply subroutine to build the kernel.
               Use  the  sync  command  to  update  the  super
               blocks, i-nodes, and delayed block I/O and then
               restart the VRM.
     5         Installation cancelled without errors.
     6         Update superblocks, i-nodes,  and delayed block
               I/O (sync), then shut down the VRM.
     7         Update cancelled by  update procedure, recovery
               needed.
     101-102   Places error code in the history file.
     104-107   Places error code in the history file.
     201-202   Places error code in the history file.
     204-208   Places error code in the history file.

     It returns the follows exit status values:

     100 Unknown return code  received by inuupdt.  It changes
        any  unknown return  code to  100 and  logs it  in the
        history file.
     103 The  restore of  the archive  file that  contains the
        update control  list, /usr/lpp/pgm-name/inst_updt/arp,
        failed.
     201 An invalid flag was specified.
     202 One or more parameters were missing.
     203 Apply list does not exist or was not readable.
     204 Too many parameters were entered.

     FLAG

     -d device Updates the program from the specified device.

FILES

     /usr/include/inu21.h          Error code  definitions for
                                   internal routines.
     /usr/lpp/pgm-name/inst_updt   Temporary directory.
     /usr/lpp/pgm-name/inst_updt.save   Directory  for   saved
                                   files.
     /usr/lpp/pgm-name/inst_updt/arp Program  specific control
                                   library.
     /usr/lpp/pgm-name/me.vv.rr.llll Document change file.
     /usr/lpp/pgm-name/ui.vv.rr.llll Update instruction file.
     /usr/sys/inst_updt            Temporary directory.
     /usr/sys/inst_updt/control    Update control library.
     /usr/sys/inst_updt/inutemp.xx...x Temporary files.
     /usr/sys/inst_updt/pgm-name_erata     Document     change
                                   library.
     /usr/sys/inst_updt/pgm-name_instr    Update   instruction
                                   library.
     /usr/sys/inst_updt/updt_cntrl Temporary file.

RELATED INFORMATION

     The following commands:  "installp" and "bffcreate."

     The discussion of code service  in Managing the AIX Oper-
     ating System.

     The lpp.hist file in  AIX Operating System Technical Ref-
     erence.

     The  discussion of  updating  programs  in AIX  Operating
     System Programming Tools and Interfaces.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026