|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris 10 9/10 Installation Guide: Custom JumpStart and Advanced Installations|
The rules file is a text file that contains a rule for each group of systems on which you want to install the Solaris OS. Each rule distinguishes a group of systems that are based on one or more system attributes. Each rule also links each group to a profile. A profile is a text file that defines how the Solaris software is to be installed on each system in the group. For example, the following rule specifies that the JumpStart program use the information in the basic_prof profile to install any system with the sun4u platform group.
karch sun4u - basic_prof -
The rules file is used to create the rules.ok file, which is required for custom JumpStart installations.
Note - If you set up the JumpStart directory by using the procedures in Creating a Profile Diskette for Standalone Systems or Creating a Profile Server for Networked Systems, an example rules file is already located in the JumpStart directory. The sample rules file contains documentation and some example rules. If you use the sample rules file, ensure that you comment out the example rules you do not intend to use.
The rules file can contain any of the following:
One or more blank lines
One or more multiline rules
For a list of rules file keywords and values, see Rule Keywords and Values.
!rule_keyword rule_value && !rule_keyword rule_value ... begin profile finish
A predefined lexical unit or word that describes a general system attribute, such as host name, hostname, or memory size, memsize. rule_keyword is used with the rule value to match a system with the same attribute to a profile. For the list of rule keywords, see Rule Keywords and Values.
A value that provides the specific system attribute for the corresponding rule keyword. Rule values are described in Rule Keywords and Values.
A symbol you must use to join rule keyword and rule value pairs in the same rule (a logical AND). During a custom JumpStart installation, a system must match every pair in the rule before the rule matches.
The name of an optional Bourne shell script that can be executed before the installation begins. If no begin script exists, you must type a minus sign (-) in this field. All begin scripts must be located in the JumpStart directory.
Information about how to create begin scripts is presented in Creating Begin Scripts.
The name of a text file that defines how the Solaris software is to be installed on the system when a system matches the rule. The information in a profile consists of profile keywords and their corresponding profile values. All profiles must be located in the JumpStart directory.
The name of an optional Bourne shell script that can be executed after the installation is completed. If no finish script exists, you must type a minus sign (-) in this field. All finish scripts must be located in the JumpStart directory.
Information about how to create finish scripts is presented in Creating Finish Scripts.
At the minimum, each rule must contain the following:
A keyword, a value, and a corresponding profile
A minus sign (-) in the begin and finish fields if no begin or finish scripts are specified
The following example shows several example rules in a rules file. Each line has a rule keyword and a valid value for that keyword. The JumpStart program scans the rules file from top to bottom.
When the JumpStart program matches a rule keyword and value with a known system, the JumpStart program installs the Solaris software that is specified by the profile that is listed in the profile field.
For a complete list of rules file limitations, see Syntax of the rules File.
Example 3-1 rule File
# rule keywords and rule values begin script profile finish script # ----------------------------- ------------ -------- ------------- hostname eng-1 - basic_prof - network 192.168.255.255 && !model \ 'SUNW,Sun-Blade-100' - net_prof - model SUNW,SPARCstation-LX - lx_prof complete network 192.168.2.0 && karch i86pc setup x86_prof done memsize 64-128 && arch i386 - prog_prof - any - - generic_prof -
The following list describes some of the keywords and values from this example.
The rule matches if the system's host name is eng-1. The basic_prof profile is used to install the Solaris software on the system that matches the rule.
The rule matches if the system is on subnet 192.168.255.255 and if the system is not a Sun Blade 100 (SUNW,Sun-Blade-100). The net_prof profile is used to install the Solaris software on systems that match this rule. This rule also provides an example of continuing a single rule onto a new line by using the backslash character (\).
The rule matches if the system is a SPARCstation LX. The lx_prof profile and the complete finish script are used to install the Solaris software on systems that match this rule.
The rule matches if the system is on subnet 192.168.2.0 and is an x86 based system. The setup begin script, the x864u_prof profile, and the done finish script are used to install the Solaris software on systems that match the rule.
The rule matches if the system has between 64 and 128 Mbytes of memory and is an x86 based system. The prog_prof profile is used to install the Solaris software on systems that match the rule.
The rule matches any system that did not match the previous rules. The generic_prof profile is used to install the Solaris software on systems that match the rule. If any is used, it should always be the last rule in the rules file.