Parses /etc/host.conf
Author: Raphael Pinson raphink@gmail.com
| Host_Conf | Parses /etc/host.conf |
| Reference | This lens tries to keep as close as possible to `man 5 host.conf` where possible. |
| License | This file is licenced under the LGPL v2+, like the rest of Augeas. |
| Lens Usage | To be documented |
| Configuration files | This lens applies to /etc/host.conf. |
| ENTRY TYPES | |
| sto_bool | Store a boolean value |
| sto_bool_warn | Store a boolean value |
| bool | A boolean switch |
| bool_warn | A boolean switch with extended values |
| list | A list of items |
| trim | |
| entry | |
| LENS AND FILTER | |
| lns | |
| filter |
This lens applies to /etc/host.conf. See filter.
Store a boolean value
let sto_bool = store ("on"|"off")
Store a boolean value
let sto_bool_warn = store ("on"|"off"|"warn"|"nowarn")
A boolean switch
let bool (kw:regexp) = Build.key_value_line kw Sep.space sto_bool
A boolean switch with extended values
let bool_warn (kw:regexp) = Build.key_value_line kw Sep.space sto_bool_warn
A list of items
let list (kw:regexp) (elem:string) = let list_elems = Build.opt_list [seq elem . store Rx.word] (Sep.comma . Sep.opt_space) in Build.key_value_line kw Sep.space list_elems
let trim = let trim_list = Build.opt_list [seq "trim" . store Rx.word] (del /[:;,]/ ":") in Build.key_value_line "trim" Sep.space trim_list
let entry = bool ("multi"|"nospoof"|"spoofalert"|"reorder") | bool_warn "spoof" | list "order" "order" | trim
let lns = ( Util.empty | Util.comment | entry )*