# Schroot

Parses /etc/schroot/schroot.conf

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

Summary

Schroot | Parses /etc/schroot/schroot.conf
Reference | This lens tries to keep as close as possible to `man 5 schroot.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/schroot/schroot.conf.
USEFUL PRIMITIVES |
comment | An IniFile.comment entry
sep | An IniFile.sep entry
ENTRIES |
description | Descriptions are special entries, which can have an optional lang parameter
entry | An IniFile.entry, or description
title | An IniFile.title
record | An IniFile.record
lns | An IniFile.lns
filter |

### Reference

This lens tries to keep as close as possible to `man 5 schroot.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/schroot/schroot.conf. See filter.

### USEFUL PRIMITIVES

### comment

> let comment = IniFile.comment "#" "#"

An IniFile.comment entry

### sep

> let sep = IniFile.sep "=" "="

An IniFile.sep entry

### ENTRIES

### description

> let description = let lang = [ Util.del_str "[" . label "lang" . store IniFile.entry_re . Util.del_str "]" ] in IniFile.entry_generic_nocomment (key "description" . lang?) sep "#" comment

Descriptions are special entries, which can have an optional lang parameter

### entry

> let entry = IniFile.entry (IniFile.entry_re - "description") sep comment | description

An IniFile.entry, or description

### title

> let title = IniFile.title IniFile.record_re

An IniFile.title

### record

> let record = IniFile.record title entry

An IniFile.record

### lns

> let lns = IniFile.lns record comment

An IniFile.lns

### filter

> let comment = IniFile.comment "#" "#"

An IniFile.comment entry

> let comment (pat:regexp) (default:string) = Util.comment_generic_seteol (Rx.opt_space . pat . Rx.opt_space) default eol

Map comments into “#comment” nodes

> let sep = IniFile.sep "=" "="

An IniFile.sep entry

> let sep (pat:regexp) (default:string) = Sep.opt_space . del pat default

Generic separator

> let description = let lang = [ Util.del_str "[" . label "lang" . store IniFile.entry_re . Util.del_str "]" ] in IniFile.entry_generic_nocomment (key "description" . lang?) sep "#" comment

Descriptions are special entries, which can have an optional lang parameter

> let entry = IniFile.entry (IniFile.entry_re - "description") sep comment | description

An IniFile.entry, or description

> let entry (kw:regexp) (sep:lens) (comment:lens) = entry_generic (key kw) sep comment_re comment

Generic INI File entry

> let title = IniFile.title IniFile.record_re

An IniFile.title

> let title (kw:regexp) = Util.del_str "[" . key kw . Util.del_str "]". eol

Title for record.

> let record = IniFile.record title entry

An IniFile.record

> let record (title:lens) (entry:lens) = record_noempty title ( entry | empty )

Generic INI File record

> let lns = IniFile.lns record comment

An IniFile.lns

> let lns (record:lens) (comment:lens) = lns_noempty record (comment|empty)

Generic INI File lens
Close