<< Previous Contents Index Next >>

3. Configuration file

3.1. Syntax

Most configuration of ipacc is done through its configuration file, by default ipacc.cf in the ipacc directory.

The configuration file consists of a series of statements, with each statement keyword followed by parameters separated by whitespace, and the statement terminated by either the end of the line or a '#' comment marker. Comments continue from the '#' to the end of the line.

Blank lines are permitted.

Parameters and keywords are delimited by whitespace; parameters containing whitespace may be placed in single or double quotes. Quote characters can be themselves quoted by use of a preceding backslash ('\').

Continuation of statements across multiple lines is indicated by use of a backslash character at the end of the line (but before any trailing comments). Quoted strings can also be continued in this fashion, however the backslash must be at the end of the line, and cannot have a comment included. Leading whitespace on the continuation line will be treated as part of the quoted string.

For example:

This shows a single keyword with three parameters, "parameter_1", "this is param 2" and "parameter_3".

3.2. Blocks

Many ipacc objects are defined as blocks, starting with an opening statement, e.g. host hostname, and ending with and end statement, e.g end host. Block nesting, where permitted, must be correct.

3.3. Include files

Files may be included by the use of a '@' sign, with @! indicating that the include is a shell command rather than a file.

Each non-blank line read from an include file is appended to the line preceding the '@'. For example, if the configuration file contains:

and the file localnets contains

what is processed is:


<< Previous Contents Index Next >>