Blame lenses/simplelines.aug
|
Packit Service |
a2ae7a |
(*
|
|
Packit Service |
a2ae7a |
Module: Simplelines
|
|
Packit Service |
a2ae7a |
Parses simple lines conffiles
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Author: Raphael Pinson <raphink@gmail.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 |
See <filter>.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Examples
|
|
Packit Service |
a2ae7a |
The <Test_Simplelines> file contains various examples and tests.
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
module Simplelines =
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: line
|
|
Packit Service |
a2ae7a |
A simple, uncommented, line *)
|
|
Packit Service |
a2ae7a |
let line =
|
|
Packit Service |
a2ae7a |
let line_re = /[^# \t\n].*[^ \t\n]|[^# \t\n]/
|
|
Packit Service |
a2ae7a |
in [ seq "line" . Util.indent
|
|
Packit Service |
a2ae7a |
. store line_re . Util.eol ]
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: lns
|
|
Packit Service |
a2ae7a |
The simplelines lens *)
|
|
Packit Service |
a2ae7a |
let lns = (Util.empty | Util.comment | line)*
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Variable: filter *)
|
|
Packit Service |
a2ae7a |
let filter = incl "/etc/at.allow"
|
|
Packit Service |
a2ae7a |
. incl "/etc/at.deny"
|
|
Packit Service |
a2ae7a |
. incl "/etc/cron.allow"
|
|
Packit Service |
a2ae7a |
. incl "/etc/cron.deny"
|
|
Packit Service |
a2ae7a |
. incl "/etc/cron.d/at.allow"
|
|
Packit Service |
a2ae7a |
. incl "/etc/cron.d/at.deny"
|
|
Packit Service |
a2ae7a |
. incl "/etc/cron.d/cron.allow"
|
|
Packit Service |
a2ae7a |
. incl "/etc/cron.d/cron.deny"
|
|
Packit Service |
a2ae7a |
. incl "/etc/default/grub_installdevice"
|
|
Packit Service |
a2ae7a |
. incl "/etc/pam.d/allow.pamlist"
|
|
Packit Service |
a2ae7a |
. incl "/etc/hostname.*"
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let xfm = transform lns filter
|