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
38 * At least entry for WPA-PSK definition can contain all printable ASCII
39 * characters including '#', ' ' and others. Comments following the entry
40 * are no option for this reason.
41 *************************************************************************)
42 (* Variable: entry_re *)
43 let entry_re = /[A-Za-z][A-Za-z0-9:._\(\) \t-]+/
46 let entry = [ key entry_re . sep
47 . IniFile.sto_to_eol? . eol ]
50 (************************************************************************
52 * GLib uses standard INI File records
53 *************************************************************************)
54 let title = IniFile.indented_title IniFile.record_re
55 let record = IniFile.record title entry
58 (************************************************************************
60 * GLib uses standard INI File records
61 *************************************************************************)
62 let lns = IniFile.lns record comment
64 (* Variable: filter *)
65 let filter = incl "/etc/NetworkManager/system-connections/*"
67 let xfm = transform lns filter