previous | next

Angel-Variables (a-variables)

Possible values for variables (options) can be given in the following ways:

1. as part of the {{<variable:value>}} statement (on-the-fly)

2. in the #VARIABLES section

3. in $VARDLOCAL/<variable> file

4. in the global $VARIABLED/<group> file

1) On-the-fly/default statement

Syntax:

{{<variable>:<value>}}

Use this syntax to set a default, or if value should be changeable. In the latter case, set a dummy value.

Example:

{{login:user1}}

2) #VARIABLES section

If you have more than one option for an a-variable, use the #PRECOMMAND section.

Example:

#PRECOMMANDS

TARGET:hda

TARGET:hdb

TARGET:hdc

This creates three values for a-variable 'TARGET'.

If no default-value (see 1) is given, the first entry will be used as a default.

3) $VARDLOCAL/<variable> - file

$VARDLOCAL stores values a-variables in files, the filename corresponds directly to the a-variable name. Each line contains one option.

$VARDLOCAL is to be used with the pre-command section to generate possible values for the angel-variables: Output of commands in the pre-command section is redirected to $VARDLOCAL/<variablename>. In the example below, a list of real users (login names) is send to a-variable 'users'. When changing a-variable 'users' within an angel, all real users of the current system are presented.

Example: create values for a-variable 'users'

#PRECOMMANDS

# create a list of options for a-variable 'MYFILES'

awk -F : '$3 > 499 {print $1}' /etc/passwd >$VARDLOCAL/users



4) $VARIABLED/<group> file

This folder stores all new or chosen entries given with command 'd'. The files are named after their respective GROUP. If no group was specified within the angel, a private group is created based on angelname and relative position to angel base directory. $VARIABLED is used by angelscripts itself. It is not supposed to be changed directly (you can, of course, if you like to and send me a mail ...)