Файловый менеджер - Редактировать - /var/www/html/augeas.zip
Ðазад
PK ! �(��� � lenses/dist/pg_hba.augnu �[��� (* Module: Pg_Hba Parses PostgreSQL's pg_hba.conf Author: Aurelien Bompard <aurelien@bompard.org> About: Reference The file format is described in PostgreSQL's documentation: http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html About: License This file is licensed under the LGPL v2+, like the rest of Augeas. About: Configuration files This lens applies to pg_hba.conf. See <filter> for exact locations. *) module Pg_Hba = autoload xfm (* Group: Generic primitives *) let eol = Util.eol let word = Rx.neg1 (* Variable: ipaddr CIDR or ip+netmask *) let ipaddr = /[0-9a-fA-F:.]+(\/[0-9]+|[ \t]+[0-9.]+)/ (* Variable: hostname Hostname, FQDN or part of an FQDN possibly starting with a dot. Taken from the syslog lens. *) let hostname = /\.?[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*/ let comma_sep_list (l:string) = let lns = [ label l . store word ] in Build.opt_list lns Sep.comma (* Group: Columns definitions *) (* View: ipaddr_or_hostname *) let ipaddr_or_hostname = ipaddr | hostname (* View: database TODO: support for quoted strings *) let database = comma_sep_list "database" (* View: user TODO: support for quoted strings *) let user = comma_sep_list "user" (* View: address *) let address = [ label "address" . store ipaddr_or_hostname ] (* View: option part of <method> *) let option = let value_start = label "value" . Sep.equal in [ label "option" . store Rx.word . (Quote.quote_spaces value_start)? ] (* View: method can contain an <option> *) let method = [ label "method" . store /[A-Za-z][A-Za-z0-9]+/ . ( Sep.tab . option )* ] (* Group: Records definitions *) (* View: record_local when type is "local", there is no "address" field *) let record_local = [ label "type" . store "local" ] . Sep.tab . database . Sep.tab . user . Sep.tab . method (* Variable: remtypes non-local connection types *) let remtypes = "host" | "hostssl" | "hostnossl" (* View: record_remote *) let record_remote = [ label "type" . store remtypes ] . Sep.tab . database . Sep.tab . user . Sep.tab . address . Sep.tab . method (* View: record A sequence of <record_local> or <record_remote> entries *) let record = [ seq "entries" . (record_local | record_remote) . eol ] (* View: filter The pg_hba.conf conf file *) let filter = (incl "/var/lib/pgsql/data/pg_hba.conf" . incl "/var/lib/pgsql/*/data/pg_hba.conf" . incl "/var/lib/postgresql/*/data/pg_hba.conf" . incl "/etc/postgresql/*/*/pg_hba.conf" ) (* View: lns The pg_hba.conf lens *) let lns = ( record | Util.comment | Util.empty ) * let xfm = transform lns filter PK ! ;֣�/ / lenses/dist/cron.augnu �[��� (* Module: Cron Parses /etc/cron.d/*, /etc/crontab Author: Raphael Pinson <raphink@gmail.com> About: Reference This lens tries to keep as close as possible to `man 5 crontab` where possible. About: License This file is licensed under the LGPL v2+, like the rest of Augeas. About: Lens Usage Sample usage of this lens in augtool * Get the entry that launches '/usr/bin/ls' > match '/files/etc/crontab/entry[. = "/usr/bin/ls"]' About: Configuration files This lens applies to /etc/cron.d/* and /etc/crontab. See <filter>. *) module Cron = autoload xfm (************************************************************************ * Group: USEFUL PRIMITIVES *************************************************************************) (* Group: Generic primitives *) (* Variable: eol *) let eol = Util.eol (* Variable: indent *) let indent = Util.indent (* Variable: comment *) let comment = Util.comment (* Variable: empty *) let empty = Util.empty (* Variable: num *) let num = /[0-9*][0-9\/,*-]*/ (* Variable: alpha *) let alpha = /[A-Za-z]{3}/ (* Variable: alphanum *) let alphanum = (num|alpha) . ("-" . (num|alpha))? (* Variable: entry_prefix *) let entry_prefix = /-/ (* Group: Separators *) (* Variable: sep_spc *) let sep_spc = Util.del_ws_spc (* Variable: sep_eq *) let sep_eq = Util.del_str "=" (************************************************************************ * Group: ENTRIES *************************************************************************) (************************************************************************ * View: shellvar * A shell variable in crontab *************************************************************************) let shellvar = let key_re = /[A-Za-z1-9_-]+(\[[0-9]+\])?/ - "entry" in let sto_to_eol = store /[^\n]*[^ \t\n]/ in [ key key_re . sep_eq . sto_to_eol . eol ] (* View: - prefix of an entry *) let prefix = [ label "prefix" . store entry_prefix ] (* View: minute *) let minute = [ label "minute" . store num ] (* View: hour *) let hour = [ label "hour" . store num ] (* View: dayofmonth *) let dayofmonth = [ label "dayofmonth" . store num ] (* View: month *) let month = [ label "month" . store alphanum ] (* View: dayofweek *) let dayofweek = [ label "dayofweek" . store alphanum ] (* View: user *) let user = [ label "user" . store Rx.word ] (************************************************************************ * View: time * Time in the format "minute hour dayofmonth month dayofweek" *************************************************************************) let time = [ label "time" . minute . sep_spc . hour . sep_spc . dayofmonth . sep_spc . month . sep_spc . dayofweek ] (* Variable: the valid values for schedules *) let schedule_re = "reboot" | "yearly" | "annually" | "monthly" | "weekly" | "daily" | "midnight" | "hourly" (************************************************************************ * View: schedule * Time in the format "@keyword" *************************************************************************) let schedule = [ label "schedule" . Util.del_str "@" . store schedule_re ] (************************************************************************ * View: entry * A crontab entry *************************************************************************) let entry = [ label "entry" . indent . prefix? . ( time | schedule ) . sep_spc . user . sep_spc . store Rx.space_in . eol ] (* * View: lns * The cron lens *) let lns = ( empty | comment | shellvar | entry )* (* Variable: filter *) let filter = incl "/etc/cron.d/*" . incl "/etc/crontab" . incl "/etc/crontabs/*" . excl "/etc/cron.d/at.allow" . excl "/etc/cron.d/at.deny" . excl "/etc/cron.d/cron.allow" . excl "/etc/cron.d/cron.deny" . Util.stdexcl let xfm = transform lns filter PK ! �Eī� � lenses/dist/fstab.augnu �[��� (* Parsing /etc/fstab *) module Fstab = autoload xfm let sep_tab = Sep.tab let sep_spc = Sep.space let comma = Sep.comma let eol = Util.eol let comment = Util.comment let empty = Util.empty let file = /[^# \t\n]+/ (* An option label can't contain comma, comment, equals, or space *) let optlabel = /[^,#= \n\t]+/ let spec = /[^,# \n\t][^ \n\t]*/ let comma_sep_list (l:string) = let value = [ label "value" . Util.del_str "=" . ( store Rx.neg1 )? ] in let lns = [ label l . store optlabel . value? ] in Build.opt_list lns comma let record = [ seq "mntent" . Util.indent . [ label "spec" . store spec ] . sep_tab . [ label "file" . store file ] . sep_tab . comma_sep_list "vfstype" . (sep_tab . comma_sep_list "opt" . (sep_tab . [ label "dump" . store /[0-9]+/ ] . ( sep_spc . [ label "passno" . store /[0-9]+/ ])? )? )? . Util.comment_or_eol ] let lns = ( empty | comment | record ) * let filter = incl "/etc/fstab" . incl "/etc/mtab" let xfm = transform lns filter (* Local Variables: *) (* mode: caml *) (* End: *) PK ! ��PI I lenses/dist/xendconfsxp.augnu �[��� module Xendconfsxp = autoload xfm let spc1 = /[ \t\n]+/ let ws = del spc1 " " let lbrack = del /[ \t]*\([ \t\n]*/ "(" let rbrack = del /[ \t\n]*\)/ ")" let empty_line = [ del /[ \t]*\n/ "\n" ] let no_ws_comment = [ label "#comment" . del /#[ \t]*/ "# " . store /[^ \t]+[^\n]*/ . del /\n/ "\n" ] let standalone_comment = [ label "#scomment" . del /#/ "#" . store /.*/ . del /\n/ "\n" ] (* Minor bug: The initial whitespace is stored, not deleted. *) let ws_and_comment = ws . no_ws_comment (* Either a word or a quoted string *) let str_store = store /[A-Za-z0-9_.\/-]+|\"([^\"\\\\]|(\\\\.))*\"|'([^'\\\\]|(\\\\.))*'/ let str = [ label "string" . str_store ] let var_name = key Rx.word let rec thing = let array = [ label "array" . lbrack . Build.opt_list thing ws . ws_and_comment? . rbrack ] in let str = [ label "item" . str_store ] in str | array let sexpr = [ lbrack . var_name . ws . no_ws_comment? . thing . ws_and_comment? . rbrack ] let lns = ( empty_line | standalone_comment | sexpr ) * let filter = incl "xend-config.sxp" let xfm = transform lns filter PK ! ��� � "