User's Guide
The expr
ession in the next example is defining a use model. Use models are not variables; they are
true / false expressions that are used to control how things are done
22
. Like variables, use
models can be viewed using the Additional button of the Basic tab in the Ignite-UX GUI. When
you are in the Additional dialog box, use models look visibly different from variables. Later in the
configuration file, is the impact statement that this use model would have when it is set to true.
INIT
23
"Create /export volume" = false
Now you have another effects relationship, this time between a new variable
_hp_root_grp_disks and _hp_root_disk. The variable _hp_root_grp_disks is meant
to be an integer so when doing the effects relationship you add zero (0) to
disk[_hp_root_disk].size to ensure that the final value is an integer. Since variables are
not explicitly typed, you want to imply an integer type.
The variable _hp_root_grp_disks is also an enum; it can take one of the values from 1 up to
the value of variable num_disks,
24
and it has a default initial value of 1.
#
# Number of disks in the root volume group
# The fist line below is just to define an "effects" relationship
# between the root disk and _hp_root_grp_disks which dependent
# upon each other in the logic to follow.
#
init _hp_root_grp_disks = (disk[_hp_root_disk].size+0) # +0 convert to int
enum _hp_root_grp_disks
_hp_root_grp_disks = { 1..num_disks }
init _hp_root_grp_disks = 1
_hp_root_grp_disks help_text "# of disks in root VG"
In the next example, you test on the size of the root disk and the number of disks attached to the
system. If the size of the root disk is <600MB and there are only two disks, the second disk is
automatically included into the root volume group (by setting _hp_root_grp_disks to be 2).
When the root disk is <600MB, the default value for _hp_disk_layout is "Whole disk (not LVM)
with HFS". If there are only two disks in the system, the second disk is included and the default for
_hp_disk_layout is changed to "Logical Volume Manager (LVM) with VxFS".
# If there are only two disks and the "_hp_root_disk" disk is small, default
to
# LVM configuration with both disks in root volume group.
disk[_hp_root_disk].size < 600Mb & num_disks == 2
{
init _hp_disk_layout = "Logical Volume Manager (LVM) with VxFS"
init _hp_root_grp_disks = 2
}
22
Unfortunately, variables cannot have effects relationships with use models or software selections.
23
The "init" keyword is case insensitive, so it can appear is init or INIT. It cannot appear in mixed case such as
"Init". If you do this, Ignite-UX will not recognize it as a keyword.
24
A built-in variable that is a count of the number of disks discovered on the system. Refer, refer to instl_adm(4).
50