DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

ccsUpgradeTool(CDMT)


ccsUpgradeTool -- merge contents of old configuration file with newer version

Syntax

ccsUpgradeTool input-file [ keyword-regexpr ]

Description

The ccsUpgradeTool helps merge the contents of an old configuration file, which might have been modified by the user, with the newer version of the configuration file.

The input-file consists of lines in the following format:

keyword:oldfile:newfile:checksum-list:if-match-action:else-action

For each line in input-file with a keyword matched by the regular expression keyword-regexpr, ccsUpgradeTool performs the following actions:

  1. Compare the results of a sum -r of oldfile with the space-separated elements of checksum-list.

    If one of the elements of checksum-list matches the sum of oldfile, this is considered a ``match''. Otherwise, this is not considered a ``match''.

  2. In the case of a match, ccsUpgradeTool executes the command if-match-action. For non-matches, ccsUpgradeTool executes else-action.

    The action fields of if-match-action and else-action can contain:

  3. Environment variables can be used in any of the fields oldfile, newfile, if-match-action, and else-action. Use the $VARIABLE syntax. See ``Component script environment variables'' in Developer's Topics for a description of the environment variables that custom(ADM). passes to the ccs.

  4. ccsUpgradeTool sets three environment variables:

    KEYWORD
    match the keyword field of the line being processed; available in the oldfile, newfile, if-match-action, and else-action fields

    OLDFILE
    match the oldfile field of the line being processed; available in the newfile, if-match-action, and else-action fields

    NEWFILE
    match the newfile field of the line being processed; available in the if-match-action and else-action fields

Exit values

ccsUpgradeTool issues a report to stdout, consisting of one line per input line matched, in the following format:
   keyword:oldfile:newfile:match-result:exec-result
In the ccsUpgradeTool report:

Examples

The following is a sample ccsUpgradeTool input file:
   
   # Sample input file to ccsUpgradeTool
   # package names as keywords
   #
   # If the user modified any of these configuration files,
   # copy each file to a private area so that we can merge 
   # the user's modifications into the new versions of the files.
   #
   # In this case, we do not specify a <newfile> or an <if-match-action>,
   # because we only want to operate on the old version if it does not
   # match our checksum list
   

RTS:${SSO_OLD_CLIENT_ROOT}/etc/default/tar::34567::\
cp ${OLDFILE} ${TMPDIR}/unix/tar
RTS:${SSO_OLD_CLIENT_ROOT}/etc/default/boot::12767 14385 23759::\
cp ${OLDFILE} ${TMPDIR}/unix/boot

Limitations

The following limitations apply to ccsUpgradeTool:

Files

/ibin/ccsUpgradeTool

See also

custom(ADM), regexp(TCL)

``Creating software upgrades'' in Developer's Topics

Standards conformance

ccsUpgradeTool is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003