Systools is the base product for three component packages and their sub-
components:  systoolsutl, which is used to get ownerships and permissions
set correctly;  cmdbin, which contains the platform-specific pieces;  and
cmdscripts, which contains the NULL-flavored pieces.

Systools and its dependent products are now meant to be installed from a
regular account, not root, with a command like:

  upd install systools v6_1 -G -c [-z <your_database>]

Note that you must specify the database if it's not first in $PRODUCTS.

========================================================================

                                    WARNING

    If you have an old version of systools (pre-v6_0) installed, you
    will want to take care that your /usr/local/systools/library files
    don't get removed by any uncurrent or unconfigure actions.  Since
    the new systools product is NULL-flavored, and the old versions of
    systools were flavored, the installation and declaration of the new
    version of systools will not undeclare the old version(s).  This is
    beneficial since it keeps your existing /usr/local/systools/library
    files intact, but it also means that you will have the old systools
    product(s) and the new NULL-flavored version declared current in
    most cases.

    To eliminate the current declaration for all old systools versions,
    while avoiding their uncurrent or unconfigure actions, we recommend
    that you convert your current.chain file to old.chain in the data-
    base directory for systools, using the following steps:

      1) Obtain the database and systools product information:

         $ ups list systools -aKdatabase:+
         "/fnal/ups/db" "systools" "v6_1" "NULL" "" "current"
         "/fnal/ups/db" "systools" "v4_3" "SunOS+5" "" "current"

      2) Using the information from the first field, convert
         the current.chain file to old.chain:

         $ cd /fnal/ups/db  (wherever your database resides)
         $ cd systools
         $ sed -e "s/ *= *current/ = old/" <current.chain >old.chain
         $ mv current.chain current.chain.save

      3) If you have already installed the latest version of
         systools, redeclare it from old to current:

         $ ups declare systools v6_1 -0 -c
         $ ups undeclare systools -0 -o

      4) Verify that the changes look right, and clean up:

         $ ups list systools -aKdatabase:+
         "/fnal/ups/db" "systools" "v6_1" "NULL" "" "current"
         "/fnal/ups/db" "systools" "v4_3" "SunOS+5" "" "old"
         $ rm current.chain.save

========================================================================

After installation, the following command must be issued as root to make
the cmd command and its associated scripts usable:

  ups InstallAsRoot systools [-z <your_database>]

Note that you must specify the database if it's not first in $PRODUCTS.

The InstallAsRoot action copies scripts and executables into the proper
directories, with root ownership and the required permissions.  If there
are already files in the target directories, the files will be copied
with a suffix of '.NEW'.  This can happen when new component products of
systools are installed.  In most cases, the '.NEW' files can be renamed
without the suffix, but you may need to merge the existing and new files
if you've made customizations.

Nota Bene:  There is a problem with ups versions prior to v4_5_1 which
prevents the execution of the InstallAsRoot actions on Linux platforms.
The recommended approach is to install ups version v4_5_1 or later, but
you can work around this problem by issuing the following series of
commands instead of the normal 'ups InstallAsRoot systools' command:

/bin/sh `$UPS_DIR/bin/ups InstallAsRoot systoolsutl -s 2>&1 | cut -f 8 -d' '`
/bin/sh `$UPS_DIR/bin/ups InstallAsRoot cmdbincmd -s 2>&1 | cut -f 8 -d' '`
/bin/sh `$UPS_DIR/bin/ups InstallAsRoot cmdbingen -s 2>&1 | cut -f 8 -d' '`
/bin/sh `$UPS_DIR/bin/ups InstallAsRoot cmdbinutl -s 2>&1 | cut -f 8 -d' '`
/bin/sh `$UPS_DIR/bin/ups InstallAsRoot cmdbin -s 2>&1 | cut -f 8 -d' '`
/bin/sh `$UPS_DIR/bin/ups InstallAsRoot cmdscriptsbase -s 2>&1 | cut -f 8 -d' '`
/bin/sh `$UPS_DIR/bin/ups InstallAsRoot cmdscriptsctrl -s 2>&1 | cut -f 8 -d' '`
/bin/sh `$UPS_DIR/bin/ups InstallAsRoot cmdscriptsguid -s 2>&1 | cut -f 8 -d' '`
/bin/sh `$UPS_DIR/bin/ups InstallAsRoot cmdscriptslgrp -s 2>&1 | cut -f 8 -d' '`
/bin/sh `$UPS_DIR/bin/ups InstallAsRoot cmdscriptshell -s 2>&1 | cut -f 8 -d' '`
/bin/sh `$UPS_DIR/bin/ups InstallAsRoot cmdscriptsuser -s 2>&1 | cut -f 8 -d' '`
/bin/sh `$UPS_DIR/bin/ups InstallAsRoot cmdscripts -s 2>&1 | cut -f 8 -d' '`
/bin/sh `$UPS_DIR/bin/ups InstallAsRoot systools -s 2>&1 | cut -f 8 -d' '`

========================================================================

Note that although the new versions of systools are NULL-flavored, the
cmdbin components are platform-specific, and must be installed for each
flavor you wish to support. You may repeat the install and InstallAsRoot
commands specifying the flavor (for either cmdbin or systools product):

  upd install systools v6_1 -G -c [-z <your_database>] -H <flavor>
  ups InstallAsRoot systools [-z <your_database>] -H <flavor>

========================================================================

For systems with an old version of systools (pre-v6_0) already installed,
there is a convert script meant to be executed via the command:

  ups ConvertAsRoot systools

The ConvertAsRoot action is provided as an aid in upgrading old systools
library functions to the new upsII/systools v6_1 system.  Its purpose is
to copy existing systools files from the old /usr/local/systools/library
directory to the new target directory, and make necessary changes so that
they can work with the new ups/systools scheme. There is no guarantee
that the edits made by this routine are sufficient or even completely
correct, since the original scripts may have virtually anything in them.

After conversion, the original files will be marked with the suffix
'.CONV'. These converted scripts should be compared with the new files
which are part of the systools packages, and the differences merged.
Normally, the functions.CONV file is simply renamed as functions.  The
sys.env file has numerous improvements, however, so the sys.env.CONV
file must be examined and the appropriate variables set in the new
sys.env file, paying particular attention to the SHADOW, YPDIR, and
YPMAKE values.

========================================================================

The final step in finishing the conversion from pre-v6_0 systools to
v6_1 is to move the old cmd executables out of the way.  We recommend
that they be replaced with a script which reminds the users that
systools must now be setup before use:

    # mv /usr/local/bin/cmd /usr/local/bin/cmd.old
    # echo "echo You must setup systools to use cmd" > /usr/local/bin/cmd
    # chmod +x /usr/local/bin/cmd

Remember that this must be done for each /usr/local/bin directory in
your cluster, if you have multiple copies, e.g. for different flavors.

========================================================================

If you have previously installed systools v6_0 (which had to be done as
root), and now wish to install systools v6_1 as a normal user, you will
likely run into permission problems installing systools, cmdbin, and
cmdscripts, and see messages like this:

  unable to make directory /fnal/ups/prd/cmdbin/v1_1/OSF1+V4:
    No such file or directory
  upd install failed.

In this case, you will need to change the ownership of the product
directories, and the database directories and chain files for the
systools, cmdbin, and cmdscripts products to something owned and/or
writable by the non-root account you will use to install systools.

If you have previously installed cmdscripts v1_0 (as part of systools
v6_0), you will have to manually reconcile file changes between v1_0's
$CMDSCRIPTS_DIR/library v1_1's $CMDSCRIPTS_DIR/library directories,
primarily for the functions and sys.env files, and the files in the
$CMDSCRIPTS_DIR/library/*.work directories.

========================================================================

Addition information is at http://www.fnal.gov/docs/products/systools/

Wayne Baisley
User Application Support
uas-group@fnal.gov
