|
Packit Service |
a2ae7a |
(*
|
|
Packit Service |
a2ae7a |
Module: Cachefilesd
|
|
Packit Service |
a2ae7a |
Parses /etc/cachefilesd.conf
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Author: Pat Riehecky <riehecky@fnal.gov>
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Reference
|
|
Packit Service |
a2ae7a |
This lens tries to keep as close as possible to `man 5 cachefilesd.conf` 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 |
See <lns>.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Configuration files
|
|
Packit Service |
a2ae7a |
This lens applies to /etc/cachefilesd.conf.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Examples
|
|
Packit Service |
a2ae7a |
The <Test_Cachefilesd> file contains various examples and tests.
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
module Cachefilesd =
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* Group: USEFUL PRIMITIVES
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Group: Comments and empty lines *)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: eol *)
|
|
Packit Service |
a2ae7a |
let eol = Util.eol
|
|
Packit Service |
a2ae7a |
(* View: comment *)
|
|
Packit Service |
a2ae7a |
let comment = Util.comment
|
|
Packit Service |
a2ae7a |
(* View: empty *)
|
|
Packit Service |
a2ae7a |
let empty = Util.empty
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Group: separators *)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: space
|
|
Packit Service |
a2ae7a |
* Separation between key and value
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
let space = Util.del_ws_spc
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: colon
|
|
Packit Service |
a2ae7a |
* Separation between selinux attributes
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
let colon = Sep.colon
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Group: entries *)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: entry_key
|
|
Packit Service |
a2ae7a |
* The key for an entry in the config file
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
let entry_key = Rx.word
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: entry_value
|
|
Packit Service |
a2ae7a |
* The value for an entry may contain all sorts of things
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
let entry_value = /[A-Za-z0-9_.-:%]+/
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: nocull
|
|
Packit Service |
a2ae7a |
* The nocull key has different syntax than the rest
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
let nocull = /nocull/i
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Group: config *)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: cacheconfig
|
|
Packit Service |
a2ae7a |
* This is a simple "key value" setup
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
let cacheconfig = [ key (entry_key - nocull) . space
|
|
Packit Service |
a2ae7a |
. store entry_value . eol ]
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: nocull
|
|
Packit Service |
a2ae7a |
* This is a either present, and therefore active or missing and
|
|
Packit Service |
a2ae7a |
* not active
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
let nocull_entry = [ key nocull . eol ]
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: lns *)
|
|
Packit Service |
a2ae7a |
let lns = (empty | comment | cacheconfig | nocull_entry)*
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let xfm = transform lns (incl "/etc/cachefilesd.conf")
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Local Variables: *)
|
|
Packit Service |
a2ae7a |
(* mode: caml *)
|
|
Packit Service |
a2ae7a |
(* End: *)
|