There are several useful environment variables you can use in your begin and finish scripts. For example, a begin script could extract the disk size (SI_DISKSIZES) and install or not install particular packages on a system based on the actual disk size the script extracts.
Information gathered about a system is stored in these environment variables, which are generally set or not, depending on the rule keywords and values you use in the rules file.
For example, information about which operating system is already installed on a system is only available (in SI_INSTALLED) after the installed keyword is used.
Table 19–1 describes these variables and their values.
Table 19–1 Installation Environment Variables
This environment variable |
Is set to |
---|---|
CHECK_INPUT |
The path to the rules file in the JumpStart directory, which is mounted on /tmp/install_config/rules. |
HOME |
The root's home directory during installation, which is /tmp/root. |
PATH |
The shell search path during installation, which is /sbin:/usr/sbin/install.d:/usr/openwin/bin:/usr/sbin:/usr/bin |
SI_ARCH |
The hardware architecture of the install client. This variable is set when the arch keyword is used in the rules file. |
SI_BEGIN |
The name of the begin script, if one is used. |
SI_CLASS |
The name of the profile used to install the install client. |
SI_CONFIG_DIR |
The path to the JumpStart directory, which is mounted on /tmp/instal_config. |
SI_CONFIG_FILE |
The path to the rules file in the JumpStart directory, which is mounted on /tmp/install_config/rules. |
SI_CONFIG_PROG |
The rules file. |
SI_CUSTOM_PROBES_FILE |
The custom_probes.ok file, in which you can define your own rule and probe keywords. If you create a custom_probes.ok file, you can use it to extend the list of default rule keywords, which are described in Table 18–3 and the list of default probe keywords described later in Table 20–1. |
SI_DISKLIST |
A comma-separated list of disk names on the install client. This variable is set when the disksize keyword is used and matched in the rules file. The SI_DISKLIST and SI_NUMDISKS variables are used to determine the physical disk to use for the rootdisk (described in How the System's Root Disk Is Determined). |
SI_DISKSIZES |
A comma-separated list of disk sizes on the install client. This variable is set when the disksize keyword is used and matched in the rules file. |
SI_DOMAINNAME |
The domain name. This variable is set when the dommainname keyword is used and matched in the rules file. |
SI_FINISH |
The name of the finish script, if one is used. |
SI_HOSTADDRESS |
The install client's IP address. |
SI_HOSTID |
The install client's Ethernet address. |
SI_HOSTNAME |
The install client's host name. This variable is set when the hostname keyword is used and matched in the rules file. |
SI_INSTALLED |
The device name of a disk with a specific operating system on it (Solaris, SunOS, or System V). This variable is set when the installed keyword is used and matched in the the rules file. SI_INST_OS and SI_INST_VER are used to determine the value of SI_INSTALLED. |
SI_INST_OS |
The name of the operating system. SI_INST_OS and SI_INST_VER are used to determine the value of SI_INSTALLED. |
SI_INST_VER |
The version of the operating system. SI_INST_OS and SI_INST_VER are used to determine the value of SI_INSTALLED. |
SI_KARCH |
The install client's kernel architecture. This variable is set when the karch keyword is used and matched in the rules file. |
SI_MEMSIZE |
The amount of physical memory on the install client. This variable is set when the memsize keyword is used and matched in the rules file. |
SI_MODEL |
The install client's model name. This variable is set when the model keyword is used and matched in the rules file. |
SI_NETWORK |
The install client's network number. This variable is set when the network keyword is used and matched in the rules file. |
SI_NUMDISKS |
The number of disks on an install client. This variable is set when the disksize keyword is used and matched in the rules file. The SI_NUMDISKS and SI_DISKLIST variables are used to determine the physical disk to use for the rootdisk (described in How the System's Root Disk Is Determined). |
SI_OSNAME |
The operating system release on the Solaris 8 Software 1 of 2 SPARC Platform Edition or Solaris 8 Software 1 of 2 Intel Platform Edition CD image. You can, for example, use this variable in a script if you want to install Solaris on systems based on the version of the operating system on the Solaris 8 Software 1 of 2 SPARC Platform Edition or Solaris 8 Software 1 of 2 Intel Platform Edition CD image. |
SI_PROFILE |
The path to the profile in the mounted JumpStart directory. This path is /tmp/install_config/profile_name. If creating a derived profile, SI_PROFILE is set to the /tmp/install.input file. |
SI_ROOTDISK |
The device name of the disk represented by the logical name rootdisk. This variable is set when the disksize or the installed keyword is set to rootdisk in the rules file. |
SI_ROOTDISKSIZE |
The size of the disk represented by the logical name rootdisk. This variable is set when the disksize or the installed keyword is set to rootdisk in the rules file. |
SI_SYS_STATE |
The /a/etc/.sysIDtool.state file. You can edit this file in a finish script to prevent the sysidroot program from prompting for a root password before the system reboots. |
SI_TOTALDISK |
The total amount of disk space on the install client. This variable is set when the totaldisk keyword is used and matched in the rules file. |
SHELL |
The default shell during installation, which is /sbin/sh. |
TERM |
The install client's terminal type. |
TZ |
The default time zone, as specified in the NIS or NIS+ name service. |