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
Ignite-UX Administration Guide: for HP-UX 11i > Chapter 12 Customizing Your Installation

Using Post-Installation Scripts

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

You can perform any number of tasks on a client after installing the operating system by providing a script to be executed. This section provides some common examples to assist you. Additionally, you can write your own scripts to mount additional disk drives, add additional software, or modify configurations based on system use.

How the Installation Functions

It is important to understand how an installation functions when using Ignite-UX. The diagram in Figure 12-4 illustrates when the various commands and scripts are executed during the installation process.

Figure 12-4 Installation Process

Installation Process

1 The commands available are very limited and execute before any volume groups or disk groups are created.

2 The available preload commands are limited and the script executes before any archives or depot-based software are installed.

3 The install.log file is closed, then the final scripts execute; any messages that are generated appear only on the console.

There are a number of points in the installation process in which you can force scripts or commands to be run. See the "Command and Script Execution Hooks" section of instl_adm(4) for specifics.

Adding a Post-Installation Script

Example

One task you generally need to perform after a new operating system installation is setting up printers. To automate this process, you can write a script that performs the HP-UX commands for adding a printer.

Following is a script for adding a remote printer named remoteprinter, making it the default printer, and then enabling the printer so that it is ready the next time that the lp scheduler is started:

#!/usr/bin/sh # Post process IUX script to add a local default printer # Performing task "Add Remote Printer": Adding "remoteprinter" # /usr/sbin/lpadmin -premoteprinter -ormserver.com -orptsslj \ -mrmodel -v/dev/null -orc -ocmrcmodel -osmrsmodel /usr/sbin/lpadmin -dremoteprinter /usr/sbin/accept remoteprinter /usr/bin/enable remoteprinter
NOTE: Make sure that the directory the post-installation script resides in is available to tftp by examining and changing the /etc/inetd.conf file.
  1. Create a script to set up access to a default network printer.

  2. Ignite-UX post-installation scripts are defined using the post_config_script variable. To add the script you created in the previous step, edit your core_cfg configuration file and add the following line:

    post_config_script += \ "/var/opt/ignite/scripts/install_default_printer"

    This sets the install_default_printer script to be run as a post-installation process on the client. This line should stand alone, and be placed outside of any clauses in the file (such as a sw_sel clause). The script set to execute with the post_config_script variable executes after all software has been installed and the system has been booted with its final kernel, but before any of the normal /etc/rc startup scripts have been run.

    You can change the default installation script behavior from the Actions menu, by choosing Install Client, and then choosing New install. Then click on the Advanced tab and select the post-installation scripts that you want to be executed.

TIP: If you want to make a script available under all configurations, add it to the /var/opt/ignite/INDEX file. For example, to execute the install_default_printer script following every client installation, add the following line to the end of this file:
scripts {"/var/opt/ignite/scripts/install_default_printer"}

This script is made available for selection on the Advanced tab for all configurations. For more information, see “Advanced Tab”.

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