www.delorie.com/gnu/docs/cfengine/cfengine-Reference_12.html   search  
Buy GNU books!

GNU cfengine

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2 Special variables

Variables are referred to in either of two different ways, depending on your taste. You can use the forms $(variable) or ${variable}. The variable in braces or parentheses can be the name of any user defined macro, environment variable or one of the following special internal variables.

A long string in the form `CFALLCLASSES=class1:class2...'. This variable is a summary of all the defined classes at any given time. It is always kept up to date so that scripts can make use of cfengine's class data.

The current detailed architecture string--an amalgamation of the information from uname. Non-definable.

The default server for binary data. Non definable.

If set to the name of a file, cfagent will use this to store checksums of important files, and give `tripwire functionality', See section 3.8.7 ChecksumDatabase.

If set to `on', security information is automatically updated, See section 3.8.8 ChecksumUpdates.

The currently defined system hard-class (e.g. sun4, hpux). Non-definable.

The current date string. Note that if you use this in a shell command it might be interpreted as a list variable, since it contains the default separator `:'.

The currently defined domain.

The faculty or site as defined in control (see site).

The fully qualified (DNS/BIND) hostname of the system, which includes the domain name as well.

The hostname of the machine running the program.

The numerical form of the internet address of the host currently running cfengine.

The maximum number of cfengines which should be allowed to co-exist concurrently on the system. This can prevent excessive load due to unintentional spamming in situations where several cfengines are started independently. The default value is unlimited.

A short for of $(arch).

This quoted string can be used to change the default `cfengine:' prefix on output lines to something else. You might wish to shorten the string, or have a different prefix for different hosts. The value in this variable is appended with the name of the host. The default is equivalent to,
  OutputPrefix = ( "cfengine:$(host):")

The character value of the string used by the file repository in constructing unique filenames from path names. This is the character which replaces `/' (see the reference manual).

This variable is identical to $(faculty) and may be used interchangeably.

The character on which list variables are split (see the reference manual).

The name or mail address of the system administrator.

The current timezone as defined in control.

If this is set to `on' cfengine uses hard-classes which begin with an underscore, so as to avoid name collisions. See also Runtime Options in the Reference manual.

The current year.

These variables are kept special because they play a special role in setting up a system configuration. You are encouraged to use them to define fully generalized rules in your programs. Variables can be used to advantage in defining filenames, directory names and in passing arguments to shell commands. The judicious use of variables can reduce many definitions to a single one if you plan carefully.

NOTE: the above control variables are not case sensitive, unlike user macros, so you should not define your own macros with these names.

The following variables are also reserved and may be used to produce troublesome special characters in strings.

Expands to the carriage-return character.

Expands to a double quote "

Expands to `$'.

Expands to a line-feed character (Unix end of line).

Expands to a newline character.

Expands to a single quote '.

Expands simply to a single space. This can be used to place spaces in filenames etc.

Expands to a single tab character.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003