Solaris Express Installation Guide: Custom JumpStart and Advanced Installations

rules File Example

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.

hostname

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.

network

The rule matches if the system is on subnet 192.168.255.255 and if the system is not a Sun Blade TM 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 (\).

model

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.

network

The rule matches if the system is on subnet 192.168.2.0 and is an x86 based sun4u 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.

memsize

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.

any

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.