|
Packit Service |
a2ae7a |
(*
|
|
Packit Service |
a2ae7a |
Module: NetworkManager
|
|
Packit Service |
a2ae7a |
Parses /etc/NetworkManager/system-connections/* files which are GLib
|
|
Packit Service |
a2ae7a |
key-value setting files.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Author: Raphael Pinson <raphael.pinson@camptocamp.com>
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: License
|
|
Packit Service |
a2ae7a |
This file is licenced under the LGPL v2+, like the rest of Augeas.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Lens Usage
|
|
Packit Service |
a2ae7a |
To be documented
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Configuration files
|
|
Packit Service |
a2ae7a |
This lens applies to /etc/NetworkManager/system-connections/*. See <filter>.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Examples
|
|
Packit Service |
a2ae7a |
The <Test_NetworkManager> file contains various examples and tests.
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
module NetworkManager =
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* INI File settings
|
|
Packit Service |
a2ae7a |
*
|
|
Packit Service |
a2ae7a |
* GLib only supports "# as commentary and "=" as separator
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
let comment = IniFile.comment "#" "#"
|
|
Packit Service |
a2ae7a |
let sep = Sep.equal
|
|
Packit Service |
a2ae7a |
let eol = Util.eol
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* ENTRY
|
|
Packit Service |
a2ae7a |
* GLib entries can contain semicolons, entry names can contain spaces and
|
|
Packit Service |
a2ae7a |
* brackets
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
(* Variable: entry_re *)
|
|
Packit Service |
a2ae7a |
let entry_re = /[A-Za-z][A-Za-z0-9:._\(\) \t-]+/
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Lens: entry *)
|
|
Packit Service |
a2ae7a |
let entry = [ key entry_re . sep
|
|
Packit Service |
a2ae7a |
. Quote.double_opt? . eol ]
|
|
Packit Service |
a2ae7a |
| comment
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* RECORD
|
|
Packit Service |
a2ae7a |
* GLib uses standard INI File records
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
let title = IniFile.indented_title IniFile.record_re
|
|
Packit Service |
a2ae7a |
let record = IniFile.record title entry
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* LENS & FILTER
|
|
Packit Service |
a2ae7a |
* GLib uses standard INI File records
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
let lns = IniFile.lns record comment
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Variable: filter *)
|
|
Packit Service |
a2ae7a |
let filter = incl "/etc/NetworkManager/system-connections/*"
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let xfm = transform lns filter
|