B.2. Set Global Definitions

The ha_set_global_defs() function sets the global definitions for the environment variables shown in this section.

The HA_INFILE and HA_OUTFILE variables set the input and output files for a script. These variables do not have global definitions, and are not set by the ha_set_global_defs() function.

B.2.1. Global Variable

B.2.1.1. HA_HOSTNAME

The output of the uname command with the -n option, which is the host name or nodename. The nodename is the name by which the system is known to communications networks.

Default: `uname -n`

B.2.2. Command Location Variables

B.2.2.1. HA_CMDSPATH

Path to user commands.

Default: /usr/lib/failsafe/bin

B.2.2.2. HA_PRIVCMDSPATH

Path to privileged commands (those that can only be run by root).

Default: /usr/lib/sysadm/privbin

B.2.2.3. HA_LOGCMD

Command used to log information.

Default: ha_cilog

B.2.2.4. HA_RESOURCEQUERYCMD

Resource query command. This is an internal command that is not meant for direct use in scripts; use the ha_get_info() function of scriptlib instead.

Default: resourceQuery

B.2.2.5. HA_SCRIPTTMPDIR

Location of the script temporary directory.

Default: /var/run/failsafe/tmp

B.2.3. Database Location Variables

B.2.3.1. HA_CDB

Location of the cluster configuration database.

Default: /var/lib/failsafe/cdb/cdb.db

B.2.4. Script Log Level Variables

B.2.4.1. HA_NORMLVL

Normal level of script logs.

Default: 1

B.2.4.2. HA_DBGLVL

Debug level of script logs.

Default: 10

B.2.5. Script Log Variables

B.2.5.1. HA_SCRIPTGROUP

Log for the script group.

Default: ha_script

B.2.5.2. HA_SCRIPTSUBSYS

Log for the script subsystem.

Default:script

B.2.6. Script Logging Command Variables

B.2.6.1. HA_DBGLOG

Command used to log debug messages from the scripts.

Default: ha_dbglog

B.2.6.2. HA_CURRENT_LOGLEVEL

The value of the current logging level. ha_log will only output messages if this value is greater than or equal to HA_NORMLVL. ha_dbglog will only output messages if this value is greater than or equal to HA_DBGLVL.

Default: 2

B.2.6.3. HA_LOG

Command used to log the scripts.

Default: ha_log

B.2.7. Script Error Value Variables

B.2.7.1. HA_SUCCESS

Successful execution of the script. This variable is used by the start, stop, restart, and monitor scripts.

Default: 0

B.2.7.2. HA_NOT_RUNNING

The script is not running. This variable is used by exclusive scripts.

Default: 0

B.2.7.3. HA_INVAL_ARGS

An invalid argument was entered. This is used by all scripts.

Default: 1

B.2.7.4. HA_CMD_FAILED

A command called by the script has failed. his variable is used by the start, stop, restart, and monitor, scripts.

Default: 2

B.2.7.5. HA_RUNNING

The script is running. This variable is used by exclusive scripts.

Default: 2

B.2.7.6. HA_NOTSUPPORTED

The specific action is not supported for this resource type. This is used by all scripts.

Default: 3

B.2.7.7. HA_NOCFGINFO

No configuration information was found. This is used by all scripts.

Default: 4