Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Software Distributor Administration Guide: HP-UX 11i v1, 11i v2, and 11i v3 > Chapter 11 Using Control Scripts

General Script Guidelines

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

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.

  • The control scripts you write may be executed several times (for example, configure, then unconfigure, then configure...) so they must be able to support multiple executions.

  • You may have to re-execute or debug control scripts, especially when they generate error or warning conditions, so your scripts should be well-written and commented.

  • Control script stdout and stderr are both logged, so you should restrict output to only the information the user requires.

  • Make sure you specify the path to a shell that is proper for your system. If you get the following message when you execute a script:

    Cannot execute /var/adm/sw/products/PRODUCT/FILESET/ configure. Bad file number (9).

    it means the shell in your script has a path that is not correct for your system. (HP-UX 9.X scripts = #!/bin/sh and HP-UX 10.X and 11.X scripts = #!/sbin/sh.)

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997, 2000-2003, 2006, 2007, 2008 Hewlett-Packard Development Company, L.P.