conserver.cf (5) Linux Manual Page
conserver.cf – console configuration file for conserver(8)
Description
The format of the conserver.cf file is made up of named blocks of keyword/value pairs, comments, and optional whitespace for formatting flexibility. The block types as well as the keywords are pre-defined and explained in the BLOCKS section. A comment is an unquoted pound-sign to a newline. See the PARSER section for full details on whitespace and quoting.
Let me first show you a sample block with a couple of keyword/value pairs to make the description a bit simpler to understand.
-
console simple { master localhost; type exec; rw *; }
This is actually a fully functional conserver.cf file (if certain conditions are met…and if you can list those conditions, you can probably can skip to the BLOCKS section).
Our example is made of up of a console-block named “simple” with three keyword/value pairs. What this does is define a console named “simple”, makes the master of that console the host “localhost”, makes the type an exec-style console, and gives every user read/write permission. This is the generic format of the file:
-
block-type block-name { keyword value; ... }
To show the addition of comments and whitespace, here is the example reformatted (but functionally equivalent):
-
# define a console named "simple" console simple { # setting all required values... master localhost; type exec; # exec-style console rw *; # allow any username }
Parser
The parser has six characters that it considers special. These are: “{”, “}”, “;”, “#”, “\”, and “"”. The first three (hereby called tokens) define the format of the configuration blocks and are used as word separators, the next is the comment character, and the last two are quoting characters.
Word separation occurs when the parser encounters an unquoted token and, in certain cases, whitespace. Whitespace is only used as a word separator when the parser is looking for a block-type or keyword. When it’s looking for a block-name or value, whitespace is like any other character, which allows you to embed whitespace in a block-name or value without having to quote it. Here is an example:
-
default my defs { rw *; include other defs ; }
The block-type is “default”, the block-name is “my defs”, and the value for the keyword “include” is “other defs”. Whitespace around tokens are ignored so you get “other defs” instead of “other defs ” as the value.
The only way to use one of the special characters as part of a block-name or value is to quote it.
Quoting is a simple matter of prefixing a character with a backslash or surrounding a group of characters with double-quotes. If a character is prefixed by a backslash, the next character is a literal (so “\” produces a “\”, “\"” produces “"”, “\{” produces a “{”, etc.). For double-quoted strings, all characters are literal except for “\"”, which embeds a double-quote.
Adding a variety of quotes to our example without changing the meaning of things, we have:
-
"defa"ult my\ defs { rw *; in
