Solaris Advanced Installation Guide

Rule Examples

The following code example shows several example rules in a rules file. Each line has a rule keyword and a valid value for that keyword. The Solaris installation program scans the rules file from top to bottom. When the Solaris installation program matches a rule keyword and value with a known system, it installs the Solaris software specified by the profile listed in the profile field.

	
#  rule keywords and rule values      begin script       profile       finish script
	#  -----------------------------      ------------       --------      -------------
 [This 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 this rule.]  hostname eng-1                        -               basic_prof          -
  [The rule matches if the system is on subnet 192.43.34.0 and it is not a SPARCstation IPX(TM) (SUNW,Sun 4_50). The net_prof profile is used to install the Solaris software on systems that match this rule. ]  network 192.43.34.0 && !model \
 'SUNW,Sun 4_50'                        -                net_prof            -
  [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. This rule also provides an example of rule wrap, which is defined on "Important Information About the rules File".]  model SUNW,SPARCstation-LX            -                 lx_prof	         complete
  [This rule matches if the system is on subnet 193.144.2.0 and the system is an x86 system. The setup begin script, the x86_prof profile, and the done finish script are used to install the Solaris software on systems that match this rule.]  network 193.144.2.0 && karch i86pc	  setup              x86_prof         done
  [This rule matches if the system has between 16 and 32 Mbytes of memory and is an x86 system. The prog_prof profile is used to install the Solaris software on systems that match this rule.]  memsize 16-32 && arch i386              -                prog_prof          -
  [This 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 this rule. If used, -any should always be in the last rule.]  any  -                                 -                generic_prof        -