Blame lenses/backuppchosts.aug
|
Packit Service |
a2ae7a |
(*
|
|
Packit Service |
a2ae7a |
Module: BackupPCHosts
|
|
Packit Service |
a2ae7a |
Parses /etc/backuppc/hosts
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Reference
|
|
Packit Service |
a2ae7a |
This lens tries to keep as close as possible to `man backuppc` where possible.
|
|
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/backuppc/hosts. See <filter>.
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
module BackupPCHosts =
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: word *)
|
|
Packit Service |
a2ae7a |
let word = /[^#, \n\t\/]+/
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: record *)
|
|
Packit Service |
a2ae7a |
let record =
|
|
Packit Service |
a2ae7a |
let moreusers = Build.opt_list [ label "moreusers" . store word ] Sep.comma in
|
|
Packit Service |
a2ae7a |
[ seq "host"
|
|
Packit Service |
a2ae7a |
. [ label "host" . store word ] . Util.del_ws_tab
|
|
Packit Service |
a2ae7a |
. [ label "dhcp" . store word ] . Util.del_ws_tab
|
|
Packit Service |
a2ae7a |
. [ label "user" . store word ]
|
|
Packit Service |
a2ae7a |
. (Util.del_ws_tab . moreusers)?
|
|
Packit Service |
a2ae7a |
. (Util.comment|Util.eol) ]
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: lns *)
|
|
Packit Service |
a2ae7a |
let lns = ( Util.empty | Util.comment | record ) *
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: filter *)
|
|
Packit Service |
a2ae7a |
let filter = incl "/etc/backuppc/hosts"
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let xfm = transform lns filter
|