HP Insight Control for Linux 6.2 User Guide

The script is run in a chroot environment so there is no need to configure paths relative to the
Insight Control for Linux environment.
For information on how these scripts can be used, see the comments in the example scripts
provided with Insight Control for Linux.
10.1.3 Predeployment, postdeployment, and final deployment scripts
Like the Precapture and Postcapture scripts, the Predeployment, Postdeployment, and Final
Deployment scripts enable you to prepare or sanitize a captured image easily, but in this case
before deploying it. You can use a deployment script to undo what a Precapture or Predeployment
script did, or to perform some other action afterward.
A Predeployment script is run on the managed system before the image is deployed in the Insight
Control for Linux RAM disk.
A Postdeployment script is run on the managed system in the Insight Control for Linux RAM
disk after the image is deployed.
Final Deployment scripts are similar to Postdeployment scripts in that they run after the
deployment has finished, except that they are run in the environment of the newly-deployed
operating system.
These scripts are optional; the default behavior is to not run any script.
Predeployment, Postdeployment, and Final Deployment scripts are Linux shell scripts; for more
information on adding, removing and managing them, see Section 5.2.5 (page 55).
NOTE: The Predeployment and Postdeployment scripts run in the Insight Control for Linux
RAM disk. The managed server's file system is mounted as read/write in the RAM disk under
the /mnt/target mountpoint. If your scripts manipulate any files on the managed server,
remember to specify /mnt/target in the path; otherwise you are only manipulating the RAM
disk files.
You can use any script that is registered and copied to the repository. Insight Control for Linux
also creates the /tmp/variables.txt file on a managed system, which contains hardware
specific information about the server. The script can source this file ( . /tmp/variables.txt)
to load information determined by the RAM disk about the current operating environment.
The /tmp/variables.txt file contains shell variables of the form VARIABLE="value". The
most important variables are:
HOSTNAME
DOMAINNAME
DEVICE
IPADDR
NETMASK
NETWORK
BROADCAST
GATEWAY
GATEWAYDEV
IMAGESERVER
The script is run in a chroot environment so there is no need to configure paths relative to the
Insight Control for Linux environment. The Final Deployment script performs a chroot command
into the managed server's file system as a final step in the deployment operation.
10.2 Prerequisites to capturing a Linux image
Table 10-2 lists the image deployment requirements of the source and target managed systems.
10.2 Prerequisites to capturing a Linux image 111