HP-UX CMGR A.02.01 Administrator's and Developer's Guide

12
Attribute Description
If
Optional. Common attribute.
if_op
Optional. Common attribute.
See 2.4 Common
Attributes for more information on common attributes.
2.2.3 The compartment Element
The compartment element manages interaction with HP-UX Compartments configuration. Upon
invocation, the compartment element handler checks the operation option from the cmgr command
and performs one of the following tasks for the compartment identified by the compartment
attribute:
Operation
Description
Add
Searches the /etc/cmpt directory for a file containing a definition for the
compartment. If the file is not found, a new /etc/cmpt/compartment.rules is
created and a compartment definition for the compartment is added. The contents of the
concatenated data child elements are then added to the top of the compartment
definition.
NOTE: You must include meta-tags around the configuration data to be added. See
2.2.10
Using meta-tags
for more information on meta-tags.
Delete
Searches the /etc/cmpt directory for a file containing a definition for the
compartment. Searches the compartment definition for the first block of data with the
exact matching open and close comment meta tag as specified in the concatenated
child data elements. If a match is found, the comment meta-tags and all data between
are deleted. If the compartment definition is empty, the handler deletes the compartment
definition. If the compartment file is empty, the handler removes it.
replace
Performs the equivalent of a delete followed by an add operation, with the exception
that the new data will be placed in the same location in the compartment definition.
list
Searches the /etc/cmpt directory for files containing matching meta tags. If a match
is found, the handler displays the entire meta-tag string. If the verbose option is
specified, the handler displays the entire content of the meta-tag data.
export
Searches the /etc/cmpt directory for files containing matching meta tags. If a
match is found, the handler adds the entire meta-tag string and all data between the
start and stop tags to the exchange.xml file in the exchange archive. The
exchange.xml file is updated for the XPath
/cmgr/body/compartments/compartment
.
import
Searches the exchange.xml file from the exchange archive, under the XML XPath
/cmgr/body/compartments/compartment directory, for matching meta tags and
their associated data. If a match is found, the handler adds the meta-tag and the data
to the compartment definition file. If necessary, a new
/etc/cmpt/compartment.rules
file is created.
Status
Displays the state of the compartment. Possible states are STARTED and STOPPED.
Upon successful completion of the add, delete or replace operation, cmgr validates all
compartment configuration with the following command: