|
An rt_reg file is an ASCII
text file. It can include comments describing the contents of the file. The
contents are the two parts described above, with the resource type property
list preceding the resource property declarations.
White space can be blanks, tabs, newlines, or comments. White space
can exist before or after tokens. Blanks and the pound sign (#) are not
considered to be white space when found in quoted value tokens. White space
separates tokens but is otherwise ignored.
Comments begin with # and end with the first newline encountered, inclusively.
Directives begin with #$ and end with the first newline encountered,
inclusively. Directives must appear in the RTR file between the resource type
property declaration section and the resource property declaration section.
Directives inserted in any other location in the RTR file will produce parser
errors. The only valid directives are #$upgrade and #$upgrade_from. Any other directive will produce parser errors.
Tokens are property names, property values, and the following:
-
{ }
- Encloses
parameter table properties
-
;
- Terminates
properties and attributes
-
=
- Separates property
names and property values or attribute names and attribute values
-
,
- Separates values
in a value list
The recognition of property-name keywords in the file
is case insensitive.
Properties and attributes have one of three formats.
-
<property-name> = <property-value>;
-
<property-name>;
-
<property-name> = <property-value> [, <property-value>];
In the format above, the square brackets, [ ], enclose optional items. That is, the property value can be
a single <property-value> or a list of two or more <property-value>s separated by commas.
The first property in the property list must be the simple resource
type name.
Boolean properties and attributes have the following syntax:
-
<boolean-property-name>;
-
<boolean-property-name> = TRUE;
-
<boolean-property-name> = FALSE;
The first and second forms both set the <boolean-property-name> to TRUE.
The only property name taking a list for its value is PKGLIST. An example is:
| |
PKGLIST = SUNWscu, SUNWrsm;
|
Resource type property names are listed in the rt_properties(5)
man page. System-defined properties are listed in the r_properties(5)
man page.
Resource declarations consist of any number of entries, each being a
bracketed list of resource property attributes.
Each attribute-value-list consists of attribute values for a resource
property, in the same syntax used for property values, with the addition
of the two type-attribute formats.
-
<type-attribute-value>;
-
<enum-type-attribute> { <enum-value> [ , <enum-value>
] };
The <type-attribute-value> syntax declares the data type of the extension property to have
the value <type-attribute-value>. It differs from the
first format of the <boolean-property-name>, which
defines the property named by <boolean-property-name>
to have the value TRUE.
For example, the TUNABLE attribute can have one of
the following values: FALSE or NONE, AT_CREATION, TRUE or ANYTIME,
and WHEN_DISABLED. When the TUNABLE
attribute uses the syntax:
it gets the value of ANYTIME.
|