Imported Upstream version 1.4.0
[platform/upstream/augeas.git] / lenses / rmt.aug
1 (*
2 Module: Rmt
3   Parses rmt's configuration file
4
5 Author: Dominic Cleal <dcleal@redhat.com>
6
7 About: Reference
8     This lens is based on rmt(1)
9
10 About: License
11   This file is licensed under the LGPL v2+, like the rest of Augeas.
12 *)
13
14 module Rmt =
15   autoload xfm
16
17 let sto_to_tab = store Rx.no_spaces
18
19 let debug  = Build.key_value_line "DEBUG" Sep.equal ( store Rx.fspath )
20 let user   = Build.key_value_line "USER" Sep.equal sto_to_tab
21 let access = Build.key_value_line "ACCESS" Sep.equal
22                ( [ label "name" . sto_to_tab ] . Sep.tab .
23                  [ label "host" . sto_to_tab ] . Sep.tab .
24                  [ label "path" . sto_to_tab ] )
25
26 let lns = ( debug | user | access | Util.comment | Util.empty )*
27
28 let filter = incl "/etc/default/rmt"
29
30 let xfm = transform lns filter