| [9] | 1 | .TH CONFIGFILE 5 | 
|---|
|  | 2 | .SH NAME | 
|---|
|  | 3 | configfile \- generic configuration file format | 
|---|
|  | 4 | .SH SYNOPSIS | 
|---|
|  | 5 | .B */etc/*.conf | 
|---|
|  | 6 | .SH DESCRIPTION | 
|---|
|  | 7 | .de SP | 
|---|
|  | 8 | .if t .sp 0.4 | 
|---|
|  | 9 | .if n .sp | 
|---|
|  | 10 | .. | 
|---|
|  | 11 | The syntax of the generic configuration file format is as follows: | 
|---|
|  | 12 | .PP | 
|---|
|  | 13 | .RS | 
|---|
|  | 14 | .nf | 
|---|
|  | 15 | .ta +16n | 
|---|
|  | 16 | configfile:     empty | 
|---|
|  | 17 | .ta +8n +8n | 
|---|
|  | 18 | |       configline configfile | 
|---|
|  | 19 | ; | 
|---|
|  | 20 |  | 
|---|
|  | 21 | .ta +16n | 
|---|
|  | 22 | configline:     wordlist '\fB;\fR' | 
|---|
|  | 23 | .ta +8n +8n | 
|---|
|  | 24 | |       \fBinclude\fR string '\fB;\fR' | 
|---|
|  | 25 | ; | 
|---|
|  | 26 |  | 
|---|
|  | 27 | .ta +16n | 
|---|
|  | 28 | wordlist:       empty | 
|---|
|  | 29 | .ta +8n +8n | 
|---|
|  | 30 | |       word wordlist | 
|---|
|  | 31 | |       string wordlist | 
|---|
|  | 32 | |       '\fB{\fR' configfile '\fB}\fR' wordlist | 
|---|
|  | 33 | ; | 
|---|
|  | 34 |  | 
|---|
|  | 35 | empty:  ; | 
|---|
|  | 36 | .fi | 
|---|
|  | 37 | .RE | 
|---|
|  | 38 | .PP | 
|---|
|  | 39 | A word is a sequence of letters, numbers, and characters from the set | 
|---|
|  | 40 | .BR "!#$%&*+-./<=>?[\e]^_|~" . | 
|---|
|  | 41 | A backslash | 
|---|
|  | 42 | .RB ( \e ) | 
|---|
|  | 43 | may be followed by a character in the set | 
|---|
|  | 44 | .B abefnrstv | 
|---|
|  | 45 | to form a BEL, BS, ESC, FF, NL, CR, SP, TAB, or VT character.  Followed by | 
|---|
|  | 46 | up to three octal digits a character of that value is formed, and likewise | 
|---|
|  | 47 | for an | 
|---|
|  | 48 | .B x | 
|---|
|  | 49 | followed by up to two hexadecimal digits.  Any other character is left | 
|---|
|  | 50 | as-is.  A backslash followed by whitespace is completely removed from the | 
|---|
|  | 51 | input.  (This includes comments.) | 
|---|
|  | 52 | .PP | 
|---|
|  | 53 | A string is started by a single or double quote, a series of characters, and | 
|---|
|  | 54 | ended by the same type of quote it started with.  Any character or | 
|---|
|  | 55 | escape with | 
|---|
|  | 56 | .B \e | 
|---|
|  | 57 | may be found in a string.  Strings may not span lines. | 
|---|
|  | 58 | .PP | 
|---|
|  | 59 | Tokens are separated by whitespace, being the usual whitespace characters | 
|---|
|  | 60 | and comments.  A comment starts with the | 
|---|
|  | 61 | .B # | 
|---|
|  | 62 | character, and ends at a newline. | 
|---|
|  | 63 | .PP | 
|---|
|  | 64 | The special word | 
|---|
|  | 65 | .B include | 
|---|
|  | 66 | tells that the file mentioned in the following string must be read and | 
|---|
|  | 67 | included at that point.  The file is found relative to the directory the | 
|---|
|  | 68 | current configuration file is found in, unless its name starts with a | 
|---|
|  | 69 | .BR / . | 
|---|
|  | 70 | A file that doesn't exist is seen as empty. | 
|---|
|  | 71 | .PP | 
|---|
|  | 72 | A generic configuration file can be read with the functions described in | 
|---|
|  | 73 | .BR configfile (3). | 
|---|
|  | 74 | .SH EXAMPLES | 
|---|
|  | 75 | Have a look at | 
|---|
|  | 76 | .BR /etc/dhcp.conf . | 
|---|
|  | 77 | .SH "SEE ALSO" | 
|---|
|  | 78 | .BR configfile (3). | 
|---|
|  | 79 | .SH NOTES | 
|---|
|  | 80 | Inspired by the configuration file of Paul Vixie's | 
|---|
|  | 81 | .BR bind . | 
|---|
|  | 82 | .SH AUTHOR | 
|---|
|  | 83 | Kees J. Bot (kjb@cs.vu.nl) | 
|---|