Problem
I want to install a product or patch using a shell script. Is there a way to use custom(ADM) non-interactively?
NOTES: This article applies to custom+ packages only. Packages
created in the earlier custom environment can be installed
non-interactively also, but the command-line options are different.
To tell if a package was created in custom or custom+, use the
dtype(C) command to determine the data type. The original custom
files are in tar(C) format, while the custom+ files will be in
cpio(C) format.The preferred method of installing products and patches is to
use custom in the interactive mode. In non-interactive mode,
important errors and warnings may be missed. In some cases
the installation may fail and you will not know why. Also,
the installation may halt if waiting for user input.If you want to create a script to install patches on replicated sites, it is recommended that you run through the install on a test system in interactive mode first to be sure the package does not require user input.
Once the script is working, use SCO Doctor for Networks to run the custom script on the remote systems.
Solution
Use command-line options to custom to do non-interactive
installations. There are many options that are listed in
the man page for custom(ADM). The basic format is:custom -p product -iThis will install the entire product from the default device,
usually the floppy drive. To use a different device than the
default, use the command:custom -p product -m devicename -iwhere 'devicename' is the full path to the device, such as /dev/cd0, or /dev/rStp0.
Note that when you install from a device, you will be prompted for the Installation media, so it is not a good choice for a non-interactive installation.
To install from media images in a directory, use the following syntax:
custom -p product -i -z directoryThe directory must contain the media images for the product to be installed. The files must follow the naming convention for media images:
VOL.000.000
VOL.001.000and so on.If the product is a patch, use these formats to apply the patch:
For OpenServer 5.0.0 and 5.0.2
------------------------------custom -p product -A -z directoryFor OpenServer 5.0.4 and 5.0.5
------------------------------custom -p product -i -z directoryTo find the product name to use for the patch, run this command:
grep PROD: /tmp/VOL.000.000where 'VOL.000.000' is the media image file. Replace /tmp with
the pathname to the file.You should get a response similar to:
PROD:SCO:Unixpatch:In this case, the product name is SCO:Unixpatch and the custom command line to apply this patch on OpenServer 5.0.0 or 5.0.2 would be:
custom -p SCO:Unixpatch -A -z /tmpand the equivalent command on OpenServer 5.0.4 or 5.0.5 would be:
custom -p SCO:Unixpatch -i -z /tmp See also
TA104763, "How to perform push-down network software installations."
custom(ADM)Chapter 17 of the SCO OpenServer Networking Guide.