Software Distributor Administration Guide (March 2009)

Table Of Contents
interpreter interpreter_name
For example:
control_file
source scripts
tag checkinstall
interpreter ksh
SD checks that the interpreter is available. If the interpreter is not available, the script
fails. (To avoid this problem, you can use a checkinstall script to verify the existence
of any script interpreters that you specify.) If SD finds the interpreter, it processes the
script normally using the interpreter that you specified.
11.1.1.3 Control Script Format
A control script should be a shell script (as opposed to a binary) and written to be
interpreted by the Posix.2 shell /sbin/sh. Korn shell (formerly /bin/ksh) syntax is
acceptable to the Posix.2 shell. A script written for csh is not supported.
The script should have a simple header similar to the example below. Included in the
header should also be comment lines which state the product and fileset to which the
script belongs, the name of the script, the revision string as required by the what(1)
command, and a simple copyright statement.
#! /sbin/sh
########
# Product: <PRODUCT>
# Fileset: <FILESET>
# configure
# @(#) $Revision: 1.1 $
########
#
# (c) Copyright MyCompany, 2001
#
########
11.2 General Script Guidelines
Here are some guidelines for writing control scripts:
Consider doing most control script work within the configure script.
All scripts are executed serially and directly impact the total time required to
complete an installation, configuration, or removal task. Consider the impact
control scripts will have on performance.
The current working directory in which the agent executes a control script is not
defined. Use the environment variables provided by the agent for all pathname
references.
Disk space analysis does not account for files created, copied or removed by control
scripts.
270 Using Control Scripts