Use > Software management > Remediate and installing software > Install software using a software policy > Remediate servers with software policies > Step 2 (Optional) - Specify reboot, error handling, and script options for remediation

Step 2 (Optional) - Specify reboot, error handling, and script options for remediation

You can specify how the remediation process will handle errors and rebooting, and if it will run any pre- or post-install scripts.

To specify these additional options:

  1. In the Rebooting section, select one of the reboot options:
    You can control when to reboot servers during the software installation or uninstallation. For example, you may want to reboot the servers after each installation or you may want to hold all server reboots until all the software is installed to minimize downtime. You can also choose to suppress all server reboots.
    • (Default) Reboot servers as specified by individual software items: This option reboots servers per the reboot requirement specified in the software resource. See About software resource reboot requirement settings.
    • Reboot servers after each installation or uninstallation: This option reboots servers after installing or uninstalling each software item.
      • Exception: If the native package manager will use several transactions in order to complete the job, a reboot will be performed only after each transaction.

    • Hold all server reboots until all actions are complete: This option suppresses server reboots until all the install/uninstall actions are complete. Then, it reboots the servers per the reboot requirement specified in the software resource.
    • Suppress all reboots: This option suppresses the reboots even if the reboot option is selected in the software resource.

    The following table describes how the remediation process handles the software resource reboot requirements when the Reboot servers as specified by individual software items setting is selected:

    Software resource reboot requirement handling

    Reboot required?

    Remediation process

    no

    The remediate process will not reboot the server after installing that software resource

    yes

    The remediate process will reboot the server after installing that software resource

    yes (all)

    If all the resources are set to reboot, the remediatie process will reboot the server after each installation.

    Exception: If the native package manager will use several transactions in order to complete the job, a reboot will be performed only after each transaction.

  2. In the Error Handling section, specify if you want to skip error handling when possible to minimize downtime.
    • (Default) Select Attempt to continue running if an error occurs if you want the processes to continue even when an error occurs with any of the software, patches or scripts.
    • Deselect this option if you want to see and respond to errors before the process continues.
  3. In the Rollback Points section you can choose to create rollback points that enable you to restore your systems to a former working state in the event of a RPM upgrade, install or erase. More information about this functionality can be found in the RPM rollback section of this guide.
  4. In the Scripts section, specify if you want any scripts to run on a server before or after installation or uninstallation. There are four tabs in this section:
    • Pre-Analyze: (Installation Only) Use this tab to enable a script that runs before software analysis.
    • Post-Analyze: (Installation Only) Use this tab to enable a script that runs after software analysis.
    • Pre-Download: (Installation Only) Use this tab to enable a script that runs before software or patches are downloaded from the software repository to the managed server.
    • Post-Download: (Installation Only) Use this tab to enable a script that runs after software or patches are downloaded, but before the software or patch is installed
    • Pre-Install/ Pre-Uninstall: Use this tab to enable a script that runs before software or patches are installed or uninstalled.
    • Post-Install/ Post-UnInstall: Use this tab to enable a script that runs after software or patches are installed or uninstalled.

     You can specify different scripts on each of the tabs, which provide the same options:
    1. Select Enable Script to enable the remainder of the fields on the tab. Enable Script must be selected for a script to run.
    2. In the Select drop-down list, select the type of script you want to run.
      • A Saved Script is stored for future use after you upload the script to SA.

        If you choose Saved Script, click Select to specify the script. The Select Script window appears. Select the script to run and click Select.
      • An Ad-Hoc Script must be entered manually and is intended only for a single operation and is not stored in SA.
        If you choose Ad-Hoc Script, select the type of script from the Type drop-down list and then enter the script content in the Script field.
    3. In the Command field, enter any command-line flags.
    4. In the Script Timeout field, enter the script time-out value in minutes.
    5. In the Retain output of field, enter the amount of output to retain in kilobytes.

    6. In the User section, indicate whether you want to run the script as root or as a specified user:
      • To execute the script as root, select SA Agent Account.
      • To execute the script as a specified user, select Name and enter the user name and password.

        To enter a Windows Domain Name in the pre-download, post-download, pre-install, post-install scripts, use the following format in the Name field: DomainName\UserName.
    7. In the Error field, indicate your error handling preference:
      • Select Stop job if script returns an error if you want the installation to stop if the script returns an error.
      • Deselect this option if you want the script to continue running even when errors occur.

  5. Click Next to proceed to the Preview step.

To skip the remaining setting steps and run the job, see Step 6 - Run the remediation job and view job status.