Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / modules_conf.aug
1 (*
2 Module: Modules_conf
3   Parses /etc/modules.conf and /etc/conf.modules
4
5   Based on the similar Modprobe lens
6
7   Not all directives currently listed in modules.conf(5) are currently
8   supported.
9 *)
10 module Modules_conf =
11 autoload xfm
12
13 let comment = Util.comment
14 let empty = Util.empty
15 let eol = Util.eol | Util.comment
16
17 (* Basic file structure is the same as modprobe.conf *)
18 let sto_to_eol = Modprobe.sto_to_eol
19 let sep_space = Modprobe.sep_space
20
21 let path = [ key "path" . Util.del_str "=" . sto_to_eol . eol ]
22 let keep = [ key "keep" . eol ]
23 let probeall = Build.key_value_line_comment "probeall"  sep_space
24                                             sto_to_eol
25                                             comment
26
27 let entry =
28     Modprobe.alias
29   | Modprobe.options
30   | Modprobe.kv_line_command /install|pre-install|post-install/
31   | Modprobe.kv_line_command /remove|pre-remove|post-remove/
32   | keep
33   | path
34   | probeall
35   
36
37 let lns = (comment|empty|entry)*
38
39 let filter = (incl "/etc/modules.conf") .
40   (incl "/etc/conf.modules")
41
42 let xfm = transform lns filter