Host_Conf - Augeas Documentation

# Host_Conf

Parses /etc/host.conf

Author: Raphael Pinson rap.nosp@m.hink@gmai.nosp@m.l.com

Summary

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 |

### 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. See filter.

### ENTRY TYPES

### sto_bool

> let sto_bool = store ("on"|"off")

Store a boolean value

### sto_bool_warn

> let sto_bool_warn = store ("on"|"off"|"warn"|"nowarn")

Store a boolean value

### bool

> let bool (kw:regexp) = Build.key_value_line kw Sep.space sto_bool

A boolean switch

### bool_warn

> let bool_warn (kw:regexp) = Build.key_value_line kw Sep.space sto_bool_warn

A boolean switch with extended values

### list

> 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

A list of items

### trim

> let trim = let trim_list = Build.opt_list [seq "trim" . store Rx.word] (del /[:;,]/ ":") in Build.key_value_line "trim" Sep.space trim_list

### entry

> let entry = bool ("multi"|"nospoof"|"spoofalert"|"reorder") | bool_warn "spoof" | list "order" "order" | trim

### LENS AND FILTER

### lns

> let lns = ( Util.empty | Util.comment | entry )*

### filter

> let sto_bool = store ("on"|"off")

Store a boolean value

> let sto_bool_warn = store ("on"|"off"|"warn"|"nowarn")

Store a boolean value

> let bool (kw:regexp) = Build.key_value_line kw Sep.space sto_bool

A boolean switch

> let bool_warn (kw:regexp) = Build.key_value_line kw Sep.space sto_bool_warn

A boolean switch with extended values

> 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

A list of items

> 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 )*

Close