RegList is a type level keylist attribute that can be used to store, or register, a list of certain resource level attributes. The agent calls the attr_changed
entry point for a resource when the value of an attribute listed in RegList is modified. The RegList attribute is useful where a change in the values of important attributes require specific actions that can be executed from the attr_changed
entry point.
By default, the attribute RegList is not included in a resource's type definition, but it can be added using either of the two methods shown below.
Assume the RegList attribute is added to the FileOnOff resource type definition and its value is defined as PathName
. Thereafter, when the value of the PathName
attribute for a FileOnOff resource is modified, the attr_changed
entry point is called.
types.cf
, for example) to include the RegList attribute. Add a line in the definition of a resource type that resembles:
static keylist RegList = { attribute1_name, attribute2_name, ...}
For example, if the type definition is for the FileOnOff resource and the name of the attribute to register is PathName
, the modified type definition would resemble:
static keylist RegList = { PathName }
haattr
command to add the RegList attribute to a resource type definition and then modify the value of the type's RegList attribute using the hatype
command; the commands are:
haattr -add -static resource_type RegList -keylist
hatype -modify resource_type RegList attribute_name
# haattr -add -static FileOnOff RegList -keylist