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:
-
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''.
-
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:
-
nothing
-
simple command.
(The PATH environment is searched, if necessary.)
-
command pipeline or redirection.
Note that the symbols ``|'', ``<'' and ``>''
must be space-separated.
-
sequence of more than one command,
separated by semicolon (;) character.
-
Environment variables can be used in any of the fields
oldfile,
newfile,
if-match-action, and
else-action.
Use the $VARIABLE syntax.
See
UNRESOLVED XREF-0
for a description of the environment variables
that
custom(ADM).
passes to the ccs.
-
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:
-
ccsUpgradeTool does not support filename wildcard expansion;
do not use characters such as ``*'' and ``?'' in filenames.
-
There is no way to include the colon (:) character itself in an input field.
-
In action fields, there is no way to
quote the semicolon (;), pipe (|), or redirection (>) and (<) characters.
Files
/ibin/ccsUpgradeTool
See also
custom(ADM),
regexp(TCL)
UNRESOLVED XREF-0
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.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 26 May 2005