3 Parses /etc/NetworkManager/system-connections/* files which are GLib
4 key-value setting files.
6 Author: Raphael Pinson <raphael.pinson@camptocamp.com>
9 This file is licenced under the LGPL v2+, like the rest of Augeas.
14 About: Configuration files
15 This lens applies to /etc/NetworkManager/system-connections/*. See <filter>.
18 The <Test_NetworkManager> file contains various examples and tests.
21 module NetworkManager =
24 (************************************************************************
27 * GLib only supports "# as commentary and "=" as separator
28 *************************************************************************)
29 let comment = IniFile.comment "#" "#"
33 (************************************************************************
35 * GLib entries can contain semicolons, entry names can contain spaces and
37 *************************************************************************)
38 (* Variable: entry_re *)
39 let entry_re = /[A-Za-z][A-Za-z0-9:._\(\) \t-]+/
42 let entry = [ key entry_re . sep
43 . Quote.double_opt? . eol ]
46 (************************************************************************
48 * GLib uses standard INI File records
49 *************************************************************************)
50 let title = IniFile.indented_title IniFile.record_re
51 let record = IniFile.record title entry
54 (************************************************************************
56 * GLib uses standard INI File records
57 *************************************************************************)
58 let lns = IniFile.lns record comment
60 (* Variable: filter *)
61 let filter = incl "/etc/NetworkManager/system-connections/*"
63 let xfm = transform lns filter