Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chngstate(1) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chkcomp

installp

rc

updatep

chngstate

PURPOSE

     Changes  the state  of a  code service  client to  either
     active-service or stand-alone.

SYNOPSIS
     chngstate [[-b -s name -e name -t m]][-m][-a -m]


DESCRIPTION

     Use the chngstate  command to change the state  of a code
     service  client to  active-service  or stand-alone.   You
     must be  a member of  the system group or  operating with
     superuser authority to run this  command.  It is also run
     by the rc command during system initialization.

      When  the command runs,  it validates and  processes the
     code service  attribute file /etc/codeserve/serverattach.
     The  contents of  this  file tell  chngstate whether  the
     system  should be  an active-service  system or  a stand-
     alone system.

     If  the  target  state  is  stand-alone,  chngstate  runs
     rc.standalone and rc.include.

     If the  target state is active-service,  chngstate checks
     the attribute file to determine:

     o   The server to use
     o   The time  between attach  attempts for  the specified
         server
     o   The maximum time to attempt individual server attach
     o   The upgrade mode (automatic or manual).

     Then  chngstate runs  the  chkcomp command  to check  for
     client-server compatability  before attempting  to attach
     to the code server in active-service mode.

     If the  client and server are  compatible, chngstate runs
     rc.actvsrve and  rc.include to  attach the client  to the
     code server  in active-service  mode.  If the  client and
     server are not compatible, chkcomp writes a comprehensive
     set of install and update orders to a cs.compat file.

     There are two types of incompatibilities:  incompatibili-
     ties that can  be fixed by the  system and incompatibili-
     ties   that    require   manual    intervention.    These
     incompatibilities are handled in the following manner:

     o   If the  incompatibilities can be fixed  by the system
         and  the  upgrade  mode   is  automatic,  the  system

         attempts  to  fix  incompatibilities by  calling  the
         internal command installc to  upgrade the install and
         update state of the client.
     o   If the  incompatibilities can be fixed  by the system
         and the  upgrade mode is manual,  the system displays
         the list of required manual actions.
     o   If  the  incompatibilities  cannot be  fixed  by  the
         system, the client defaults to stand-alone mode.

     In the later two cases,  the user is responsible for ini-
     tiating the  required install and update  actions (orders
     in the cs.compat file)  to resolve the incompatibilities.
     The system will not attach  a client as long as incompat-
     ibilities exist.  To manually resolve incompatibilities:

     o   Run installp or updatep to install or update programs
         on the client.
     o   Rerun the  chngstate command to  verify compatibility
         and attach to the server as an active-service client.

     For more information on the compatibility rules and which
     types of  incompatibilities can  be fixed by  the system,
     see Managing the AIX Operating System.

     Notes:

     1.  The upgrade mode parameter (automatic or manual) must
         be specified in  the attribute file or  an error will
         result.  However,  you can override the  attribute in
         the  file by  specifying the  -a  or -m  flag in  the
         chngstate command.

     2.  If chngstate encounters a  server timeout error while
         attempting to attach  to a server, it  reads the next
         system attribute  file stanza and attempts  to attach
         to that  server according  to the  stanza attributes.
         Any  other error  causes  the system  to  come up  in
         stand-alone mode.

     3.  You can also run the  ckcomp command from the command
         line to  get a list  of which programs  are incompat-
         ible.  However, ckcomp does not leave you attached to
         the server in active-service mode.

FLAGS

     -a        Uses automatic upgrade  mode when attempting to
               attach  to any  server with  a target  state of
               active-service.  This  flag overrides  the mode
               set in the system attribute file stanzas.
     -b        Prevents  chngstate  from   running  a  killall
               command.  This  flag should  be used  only when
               chngstate is  run from /etc/rc during  a system
               boot.
     -e name   Excludes the attribute file stanza specified by
               name.  To  exclude more than one  stanza, enter
               the -e flag for each stanza.

     -m        Uses  manual upgrade  mode  when attempting  to
               attach  to any  server with  a target  state of
               active-service.  This  flag overrides  the mode
               set in the system attribute file stanzas.
     -s name   Starts  processing with  this system  attribute
               file stanza.
     -t n      Specifies the total time  in seconds to attempt
               to attach to any server.   The time, n, must be
               greater than or equal to 60.

INTERNAL COMMANDS

     The chngstate  command uses  the following  internal com-
     mands.   Because  they  are internal  commands,  they  do
     minimum validation of input parameters.

       installc

     The installc  command installs  a full program  or subset
     program.  It uses the following syntax:

     The installc command attempts to upgrade the installation
     or update  state of an  active-service client to  make it
     fully compatible  with a specific server  by installing a
     full program  or a  subset program on  the active-service
     client.   Generally, installc  is  run  by the  chngstate
     command  when there  is  an incompatibility  that can  be
     automatically  corrected  by  installing  a  complete  or
     subset program.  A user's path would not normally include
     this command.  It  is located at /etc/codeserve/installc.
     The installc command  requires you to be a  member of the
     system group or operating with superuser authority.

     When run, installc processes  install and update requests
     from  an input  file in  the format  defined in  the file
     cs.compat.   Install requests  result  in a  call to  the
     command installp and update requests  result in a call to
     the internal command updatec.

     The  chngstate   command  runs  this  command   when  the
     cs.compat file contains only  install, update, or install
     and update records.  If cs.compat  does not exist or con-
     tains dbos,  uplevel, or  unknown records,  installc will
     not be run.  In this  case the user must manually upgrade
     the client by running the installp or updatep command for
     the appropriate programs.

     If  install  records  exist, then  chngstate  mounts  the
     server  directory   /usr/lpp.install  prior   to  running
     installc.  If update records exist, then chngstate mounts
     the server directory /usr/lpp.update.

     The  -r path  parameter is  used  to pass  the path  that
     installc  must  use  to   gain  access  to  the  server's
     /usr/lpp.install directory.   It represents a  local path

     where chngstate has mounted the / (root) directory of the
     server.

     The file is an input file in cs.compat format.  This file
     contains specific install and update requests required to
     make  the client  fully compatible  with a  specific code
     server.

       updatec

     The updatec command controls  the update process for com-
     plete or  subset programs on active-service  clients in a
     code service environment.  It uses the following syntax:

     Generally, this command is run from the installc internal
     command to upgrade the update  state of an active service
     client  and  make it  fully  compatible  with a  specific
     server on an active service network.  A user's path would
     not  normally  include  this  file.   It  is  located  at
     /etc/codeserve/updatec.   You must  be  a  member of  the
     system group or be  operating with superuser authority to
     run this command.

     When run, this command  processes update requests from an
     input file in  the format defined in  the file cs.compat.
     Update requests result in a  call to the updatep internal
     command, inuupdt.

     This command is  run by installc only  when the cs.compat
     file  contains update  records.   If  cs.compat does  not
     exist  or contains  dbos,  uplevel,  or unknown  records,
     installc will not be called.

     The  -r path  parameter is  used  to pass  the path  that
     updatec  must   use  to  gain  access   to  the  server's
     /usr/lpp.update  directory.  It  represents a  local path
     where chngstate has mounted the / (root) directory of the
     server.

     The file is an input  file in cs.compat format.  The file
     contains specific  update requests required to  make this
     client fully compatible with a specific code server.

FILES

     /etc/codeserve/cs.compat       Contains   information  on
                                    client and  server compat-
                                    ibility.
     /etc/codeserve/serverattach    Contains    code   service
                                    attribute information.
     /etc/rc                        Performs   normal  startup
                                    initialization.
     /etc/rc.standalone             Initializes    stand-alone
                                    system.

     /etc/rc.actvsrvc               Initializes active-service
                                    client.
     /usr/lpp.install               Server    directory   con-
                                    taining    backup   format
                                    files   required   to   do
                                    installs.
     /usr/lpp.update                Server    directory   con-
                                    taining    backup   format
                                    files   required   to   do
                                    updates.

RELATED INFORMATION

     The following  commands:  "chkcomp,"   "installp," "rc,"
     "updatep."

       The /etc/codeserve/serverattach  file in  AIX Operating
     System Technical Reference.

     The    discussion    of     code    service    and    the
     /etc/codeserve/cs.compat file  in Managing the  AIX Oper-
     ating System.

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