HP-UX CMGR A.02.01 Administrator's and Developer's Guide
23
Value Description
“regexp ('regular
expression', ‘err
message’)”
Performs a Perl match operation for value against the regular
expression.
“range(x,y, ‘error msg’)”
Ensures that the following is true:
x <= value <= y
“noop”
Accept any value.
“ipVerify('ipaddress')”
Checks whether the IP address is valid.
“userExists()”
Checks whether the user is configured on the system.
“groupExists()”
Checks whether the group is configured on the system.
“cmptExists”
Ensures value is the name of an existing compartment definition
in
/etc/cmpt
file.
“fileTest(‘test’,’error
msg’)”
Tests file where test is a filetest operator as defined by
Perl. For instance, test can be -dd for directory test, -ee for
exists,
x
for executable.
“csvList(‘function’, arg1,
… argN)”
Calls function (arg1,….,argN) for each element in a comma
separated list.
Templates can contain variables anywhere within a template. When cmgr encounters a variable,
generally defined by a dollar sign $ followed by a name attribute of a var element, it logically
replaces the variable with the var element’s current value attribute. Template variable replacement
utilizes shell style variable replacement algorithm.
The following example shows the various value for a var element with a name attribute of var1 and
a value attribute of 123:
var Element
Value
abc$var1 def
“abc123 def”
abc${var1}def
“abc123def”
abc\$def
“abc$def”
NOTE: For a variable replacement with multi-valued variables, use the repeat element.
CMGR reserved the following built-in variables, which are defined for all templates:
Variable Name Description
$op
The current operation add, delete, replace, list, import,
export
, or
status
.
$context
The context variable passed to the handler functions.