Imported Upstream version 0.10.0
[platform/upstream/augeas.git] / lenses / login_defs.aug
1 (*
2 Module: Login_defs
3   Lense for login.defs
4
5 Author: Erinn Looney-Triggs
6
7 About: License
8   This file is licensed under the LGPLv2+, like the rest of Augeas.
9
10 About: Configuration files
11    This lens applies to /etc/login.defs. See <filter>.
12 *)
13 module Login_defs =
14 autoload xfm
15
16 (* View: record
17     A login.defs record *)
18 let record =
19   let value = store /[^ \t\n]+([ \t]+[^ \t\n]+)*/ in
20   [ key Rx.word . Sep.space . value . Util.eol ]
21
22 (* View: lns
23     The login.defs lens *)
24 let lns = (record | Util.comment | Util.empty) *
25
26 (* View: filter *)
27 let filter = incl "/etc/login.defs" . Util.stdexcl
28
29 let xfm = transform lns filter