Installing HP-UX 11.0 and Updating HP-UX 10.x to 11.0 HP 9000 Computers Edition 1

256 Appendix C
Ignite-UX System Administration
Section 5: Post Install Scripts
Section 5: Post Install Scripts
Any number of tasks may be performed on the target system after the
OS is installed by providing a script to be run on the target system. This
section touches on some common examples, but scripts can easily be
written to mount additional disk drives, add additional software, modify
configurations based on system use, etc.
There are a number of points in the install process in which you can force
scripts or commands to be run. Check the instl_adm(4) man page under
the “Command and Script Execution Hooks” section for specifics. One
point to note is that the post_config_script will run after all software has
been loaded and the system has been booted with its final kernel, but
BEFORE any of the normal /etc/rc startup scripts have been run. Basic
networking is enabled in this environment.
1. Procedure for adding a post-installation
script
Step 1: Create a script.
Create a script to perform the desired task. When Ignite-UX runs this
script as a post-configuration, it will be run on the target system.
Step 2: Add the script to your configuration file.
Ignite-UX post-configuration scripts are defined using the
“post_config_script” variable. For example, you can place the following
line into your core_700_archive_cfg config file:
post_config_script += \
“/var/opt/ignite/scripts/install_default_printer”
The above will define the “install_default_printer” script to be run as a
post installation process on the target system. Note, the line should
stand alone, placed OUTSIDE of any clause (i.e. a sw_sel clause). By
default, the script will always be run on the targets. You can change the
behavior using the ignite user-interface in the “advanced” tab.
If you want to make a script available under all configurations, you can
add it to the /var/opt/ignite/INDEX file. Add the following to the end of
this file:
scripts { “/var/opt/ignite/scripts/install_default_printer” }