Imported Upstream version 2.6.0
This commit is contained in:
parent
26fb71b504
commit
459aaf9392
510 changed files with 40508 additions and 18859 deletions
48
scripts/augeas/nutnutconf.aug.in
Normal file
48
scripts/augeas/nutnutconf.aug.in
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
(*
|
||||
Module: NutNutConf
|
||||
Parses @CONFPATH@/nut.conf
|
||||
|
||||
Author: Frederic Bohe <fredericbohe@eaton.com>
|
||||
|
||||
About: License
|
||||
This file is licensed under the GPL.
|
||||
|
||||
About: Lens Usage
|
||||
Sample usage of this lens in augtool
|
||||
|
||||
* Print NUT MODE start-up configuration:
|
||||
> print /files@CONFPATH@/nut.conf/MODE
|
||||
|
||||
About: Configuration files
|
||||
This lens applies to @CONFPATH@/nut.conf. See <filter>.
|
||||
*)
|
||||
|
||||
module NutNutConf =
|
||||
autoload nut_xfm
|
||||
|
||||
|
||||
(************************************************************************
|
||||
* Group: NUT.CONF
|
||||
*************************************************************************)
|
||||
|
||||
(* general *)
|
||||
let def_sep = IniFile.sep IniFile.sep_re IniFile.sep_default
|
||||
let sep_spc = Util.del_opt_ws ""
|
||||
let eol = Util.eol
|
||||
let comment = Util.comment
|
||||
let empty = Util.empty
|
||||
|
||||
|
||||
let nut_possible_mode = "none"
|
||||
| "standalone"
|
||||
| "netserver"
|
||||
| "netclient"
|
||||
|
||||
let nut_mode = [ sep_spc . key "MODE" . def_sep . sep_spc . store nut_possible_mode . eol ]
|
||||
|
||||
let nut_lns = (nut_mode|comment|empty)*
|
||||
|
||||
let nut_filter = ( incl "@CONFPATH@/nut.conf" )
|
||||
. Util.stdexcl
|
||||
|
||||
let nut_xfm = transform nut_lns nut_filter
|
||||
Loading…
Add table
Add a link
Reference in a new issue