Imported Upstream version 1.7.0
[platform/upstream/augeas.git] / lenses / star.aug
1 (*
2 Module: Star
3   Parses star's configuration file
4
5 Author: Cedric Bosdonnat <cbosdonnat@suse.com>
6
7 About: Reference
8     This lens is based on star(1)
9
10 About: License
11   This file is licensed under the LGPL v2+, like the rest of Augeas.
12 *)
13
14 module Star =
15   autoload xfm
16
17 let sto_to_tab = store Rx.no_spaces
18
19 let size  = Build.key_value_line "STAR_FIFOSIZE" Sep.space_equal ( store /[0-9x*.a-z]+/ )
20 let size_max   = Build.key_value_line "STAR_FIFOSIZE_MAX" Sep.space_equal ( store /[0-9x*.a-z]+/ )
21 let archive = Build.key_value_line ( "archive". /[0-7]/ ) Sep.equal
22                ( [ label "device" . sto_to_tab ] . Sep.tab .
23                  [ label "block" . sto_to_tab ] . Sep.tab .
24                  [ label "size" . sto_to_tab ] . ( Sep.tab .
25                  [ label "istape" . sto_to_tab ] )? )
26
27 let lns = ( size | size_max | archive | Util.comment | Util.empty )*
28
29 let filter = incl "/etc/default/star"
30
31 let xfm = transform lns filter