The rules file is a text configuration file used to associate a machine profile and pre- and post-install scripts with a particular machine to perform an unattended installation. The rules file consists of at least one line containing five entries of the following type:
- Keywords
- Values
- Begin (pre-script)
- Class profile
- Post (finish scripts)
Line Format :
[!] keyword value [&& [!] keyword value ] [begin_script] [profile] [finish_script]Where:
- The keyword(s) and value(s) are matched to the client. Multiple keyword - value pairs may be specified for a single rule. Once a match is made, no further processing of the rules file is done. Logical operations for keyword - value paris are allowed.
- Lines beginning with # are treated as comments.
- The pre- and post-install scripts are Bourne shell scripts, run before and after the installation, respectively, which can be used to save and restore files, install additional packages and perform site-specific customization.
- The profile is a configuration file for the installation containing information about the disk layout, the installation type and the packages to be installed.
The pre-install script, profile and post-install script names are given relative to the directory containing the rules file. The begin script, profile and finish script are all optional, but must be replaced with a hyphen if there is no value.
Examples of valude keywords are:
- any -
matches any machine - arch sparc
from output of uname -p (sparc or i386) - disksize c0t1d0 600-800
disk is in the form c#t#d#, and size range is specified in MB - hostname wihok
hostname from output of uname -n - karch sun4u
platform group from output of uname -m (sun4m, i86pc,...) - memsize 16-32
range of physical RAM on the machine (in MB) - network 192.168.100.0
logical AND between IP and subnet mask
Sample profiles, rules and begin/finish scripts can be found in the following directories:
- Misc/.install_config
- Misc/jumpstart_sample
Some examples of rules are as follows (split over lines for readability, this may be done in the rules file as well:
hostname wihok begin-sc class-wihok end-sc
network 192.168.100.0 - classnet finish-sc
karch sun4u && disksize c0t0d0 100-800 small_begin small_class small_finish
After changes have been made to the rules, they must be verified by running the check script. This creates a rules.ok file, which is the file actually used by jumpstart.
<
0 comments:
Post a Comment