Software Distributor Administration Guide for HP-UX 11i
Using Control Scripts
Control Script Input and Output
Chapter 11 397
Control Script Input and Output
• Except for request scripts, control scripts must not be interactive.
This includes messages such as, Press return to continue.
• Except for request scripts, all control scripts are executed by the
agent on the target systems. Request scripts are executed by the
controller (swinstall, swconfig, or swask).
• Except for request scripts, no method of input to control scripts is
supported. Request script data is input by the user through the
swask command or the ask option for swinstall or swconfig.
• Control scripts must write messages for error and warning
conditions to stderr (echo &>2), and write all other messages to
stdout. Control scripts must not write directly to /dev/console or
attempt any other method of writing directly to the display.
The stdout and stderr from a control script is redirected by the
agent to the log file (var/adm/sw/swagent.log) within the primary
or alternate root directory in which the task is being performed.
For interactive swinstall and swremove sessions, you can display and
browse this logfile.
• Only minimal, essential information should be emitted by control
scripts. Ideally, no output is emitted if the script successfully
performs all of its actions.
• In the agent logfile, the execution of each control script is prefaced by
a “begin execution” message:
* Running "checkinstall" script for product "PRODUCT"
* Running "checkinstall" script for fileset
"PRODUCT.FILESET".
Any messages generated by the script will follow. If the script returns
a value other than 0 (SUCCESS), then a concluding message such as
the following, is written: