Specify install scripts

For each patch, you can specify a command or script to run before installation or after installation. A pre-install script, for example, could check a certain condition on the managed server. If the condition is not met or if the pre-install script fails, the patch would not be installed. A pre-install script could also be used to shut down a service or application before it is patched. A post-install script could be used to perform a certain cleanup process on the managed server.

You can also specify the following types of scripts to run on the managed server before or after an installation or download phase:

  • Pre-download: A script that runs before patches are downloaded from SA to the managed server. This is available only if you select Staged in the Install Options step.
  • Post-download: A script that runs after patches are downloaded from SA to the managed server and before the patch is installed. This is available only if you select Staged in the Install Options step.
  • Pre-install: A script that runs before patches are installed on the managed server.
  • Post-install: A script that runs after patches are installed on the managed server.

To specify a pre-install script:

  1. In the Install Patch window, click Next to advance to the Pre & Post Actions step.
  2. Select the Pre-Install tab. You may specify different scripts and options on each of the tabs.
  3. Select Enable Script. This option enables the remainder of the fields on the tab. If Enable Script is not selected, the script will not run.
  4. Select either Saved Script or Ad-Hoc Script.

    A Saved Script has been previously stored in Server Automation with the SA Client. To specify the script, click Select.

  5. If the script requires command-line flags, enter the flags in the Command text box.

  6. Specify the information in the Runtime Options. If you choose a user account other than root, enter the User Name and Password. The script will be run by this user on the managed server.

  7. To stop the installation if the script returns an error, select the Error check box.

  8. Click Next to go to the next step or click Cancel to close the Install Patch window.