Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z

M |
| machine, BootConf
| macro NagiosConfig Xymon_Alerting
| MACRO DEFINITION, Xymon_Alerting
| macro_def, NagiosConfig
| macrodefinition, Xymon_Alerting
| mail, Xymon_Alerting
| Mailscanner
| Mailscanner_rules
| MAIN OPTIONS, Resolv
| Make some sub-lenses for use in later lenses, Chrony
| make_value, Erlang
| makestep, Chrony
| map_entry, Nslcd
| map_format, Automaster
| map_generic, Automaster
| map_ldap, Automaster
| map_ldap_name, Automaster
| map_line, Grub
| map_mount, Automaster
| map_name Automaster Automounter
| map_names, Nslcd
| map_type, Automaster
| mapped_entry, Nslcd
| marker, Known_Hosts
| MasterPasswd
| maxchange, Chrony
| MCollective
| member, Gshadow
| member_list, Gshadow
| Memcached
| menu_entry, Grub
| menu_error, Grub
| menu_setting, Grub
| meta_release, Test_Apt_Update_Manager
| metadata, Puppetfile
| method, Pg_Hba
| minute, Cron
| misc_check, Test_Keepalived
| misc_check_field, Keepalived
| Mke2fs
| mod, Puppetfile
| mode, Tmpfiles
| mode3, Test_Tmpfiles
| mode3_tree, Test_Tmpfiles
| modpath, Solaris_System
| Modprobe
| module_line, Grub
| moduledir, Puppetfile
| Modules
| Modules_conf
| MongoDBServer
| month, Cron
| mount_max, Fuse
| mount_option, FAI_DiskConfig
| mount_option_value, FAI_DiskConfig
| mount_options, FAI_DiskConfig
| mountpoint, FAI_DiskConfig
| mountpoint_kw, FAI_DiskConfig
| multi, Test_Systemd
| multi_empty, Up2date
| multi_entry, Up2date
| multi_single, Up2date
| multi_value, Up2date
| multi_values, Up2date
| multiboot_arg, Grub
| multiline_ace, Test_IniFile
| multiline_nl, Test_IniFile
| multiline_test, Test_IniFile

> let machine = let machine_entry = Build.key_value ("comaddr"|"memory") space (store word) | Build.flag ("diskinfo"|"regs") in Build.key_value_line "machine" space (Build.opt_list machine_entry space)

machine [command]

> let macro = [ Util.indent . macro_def . Util.eol ]

> let macro = [ key /\$[^ =\t\n#\/]+/ . filters_opt ]

The macro recipient definition

> let macro_def = let macro = /\$[A-Za-z0-9]+\$/ in let macro_decl = Rx.word | Rx.fspath in key macro . Sep.space_equal . store macro_decl

Macro line, as used in resource.cfg

> let macrodefinition = [ key /\$[^ =\t\n#\/]+/ . Sep.space_equal . store Rx.space_in . eol ]

A string that starts with $ and that is assigned something

> let mail = [ key "MAIL" . ws . store_word . filters_opt ]

The mail recipient definition
Parses MailScanner configuration files.
Parses MailScanner rules files.

> let make_value (lns:lens) = [ label "value" . lns ]

Make a “value” subnode for arrays/tuples

> let makestep = [ Util.indent . key "makestep" . space . [ label "threshold" . store number ] . space . [ label "limit" . store integer ] . eol ]

makestep has specific syntax

> let map_entry = [ key "map" . spc . [ key map_names . spc . [ key key_name . spc . store Rx.no_spaces ] ] .eol ]

A map entry as in `map MAP ATTRIBUTE NEWATTRIBUTE`.

> let map_format = [ label "format" . store format ]

> let map_generic = ( map_type . ( Sep.comma . map_format )? . Sep.colon )? . map_name

Used for all except LDAP maps which are parsed further

> let map_ldap = [ label "type" . store "ldap" ] . ( Sep.comma . map_format )? . Sep.colon . map_ldap_name

> let map_ldap_name = ( [ label "host" . store host ] . Sep.colon )? . [ label "map" . store dn ]

Split up host:dc=foo into host/map nodes

> let map_line = [ command "map" "\t" . spc . [ label "from" . store /[()A-za-z0-9]+/ ] . spc . [ label "to" . store /[()A-za-z0-9]+/ ] . eol ]

> let map_mount = [ seq "map" . store mount . Util.del_ws_tab . ( map_generic | map_ldap ) . ( Util.del_ws_spc . comma_spc_sep_list "opt" )? . Util.eol ]

Mountpoint and whitespace, followed by the map info

> let map_name = [ label "map" . store name ]

> let map_name = /[^: \t\n]+/

> let map_names = /alias(es)?/ | /ether(s)?/ | /group/ | /host(s)?/ | /netgroup/ | /network(s)?/ | /passwd/ | /protocol(s)?/ | /rpc/ | /service(s)?/ | /shadow/

> let map_type = [ label "type" . store type ]

> let mapped_entry (kw:string) (sto:regexp) = [ key kw . spc . Build.key_value_line map_names spc (store sto) ]

A mapped configuration as in `filter MAP option`.

> let marker = [ key /@(revoked|cert-authority)/ . Sep.space ]

The marker is optional, but if it is present then it must be one of “@cert-authority”, to indicate that the line contains a certification authority (CA) key, or “@revoked”, to indicate that the key contained on the line is revoked and must not ever be accepted.
Parses /etc/master.passwd

> let maxchange = [ Util.indent . key "maxchange" . space . [ label "threshold" . store number ] . space . [ label "delay" . store integer ] . space . [ label "limit" . store integer ] . eol ]

maxchange has specific syntax
Parses MCollective’s configuration files

> let member = [ label "member" . store word ]

> let member_list = Build.opt_list member comma

the member list is a comma separated list of users allowed to chgrp to the group without being prompted for the group’s password
Parses Memcached’s configuration files

> let menu_entry = kw_menu_arg "default" | kw_menu_arg "fallback" | kw_pres "hiddenmenu" | kw_menu_arg "timeout" | kw_menu_arg "splashimage" | kw_menu_arg "gfxmenu" | kw_menu_arg "foreground" | kw_menu_arg "background" | kw_menu_arg "verbose" | kw_menu_arg "boot" (* only for CLI, ignored in conf *) | serial | terminal | password_arg | color | device | setkey

> let menu_error = let kw = /default|fallback|hiddenmenu|timeout|splashimage|gfxmenu/ |/foreground|background|verbose|boot|password|title/ |/serial|setkey|terminal|color|device/ in error kw

Accept lines not matching menu_entry and stuff them into ‘#error’ nodes

> let menu_setting = menu_entry | menu_error

a valid menu setting or a line that looks like one but is an #error

> let meta_release = "# default location for the meta-release file [METARELEASE] URI = http://changelogs.ubuntu.com/meta-release URI_LTS = http://changelogs.ubuntu.com/meta-release-lts URI_UNSTABLE_POSTFIX = -development URI_PROPOSED_POSTFIX = -proposed "

> let metadata = [ Util.indent . key "metadata" . comment_or_eol ]

a metadata entry

> let method = [ label "method" . store /[A-Za-z][A-Za-z0-9]+/ . ( Sep.tab . option )* ]

can contain an option

> let minute = [ label "minute" . store num ]

> let misc_check = "virtual_server 192.168.1.11 22 { real_server 10.20.40.10 22 { MISC_CHECK { misc_path /usr/local/bin/server_test misc_timeout 3 misc_dynamic } } } " test Keepalived.lns get misc_check = { "virtual_server" { "ip" = "192.168.1.11" } { "port" = "22" } { "real_server" { "ip" = "10.20.40.10" } { "port" = "22" } { "MISC_CHECK" { "misc_path" = "/usr/local/bin/server_test" } { "misc_timeout" = "3" } { "misc_dynamic" } } } }

An example of a MISC health checker

> let misc_check_field = let flag_re = "misc_dynamic" in let num_re = "misc_timeout" in let to_eol_re = "misc_path" in field num_re sto_num | flag flag_re | field to_eol_re sto_to_eol

Parses /etc/mke2fs.conf

> let mod = let mod_name = Quote.do_quote (store ((Rx.word . /[\/-]/)? . Rx.word)) in let version = [ label "@version" . Quote.do_quote (store /[^#:\n]+/) . Util.comment_eol? ] in let sto_opt_val = store /[^#"', \t\n][^#"',\n]*[^#"', \t\n]|[^#"', \t\n]/ in let opt = [ Util.del_str ":" . key Rx.word . (del /[ \t]*=>[ \t]*/ " => " . Quote.do_quote_opt sto_opt_val)? ] in let opt_eol = del /([ \t\n]*\n)?/ "" in let opt_space_or_eol = del /[ \t\n]*/ " " in let comma_opt_eol_comment = comma_nospace . (opt_eol . Util.comment_eol)* . opt_space_or_eol in let opts = Build.opt_list opt comma_opt_eol_comment in [ Util.indent . Util.del_str "mod" . seq "mod" . Sep.space . mod_name . (comma_opt_eol_comment . version)? . (comma_opt_eol_comment . opts . Util.comment_eol?)? . Util.eol ]

a module entry, with optional version and options

> let mode = /(-|~?[0-7]{3,4})/

“-”, or 3-4 bytes.

> let mode3 = "c+! /tmp/foo 755\n"

Mode field example with only three digits

> let mode3_tree = { "1" { "type" = "c+!" } { "path" = "/tmp/foo" } { "mode" = "755" } }

Tree for mode3

> let modpath = [ seq "modpath" . store /[^ :\t\n]+/ ]

Individual moddir search path entry
Parses /etc/modprobe.conf and /etc/modprobe.d/*

> let module_line = [ command /module\$?/ "\t" . spc . kernel_args ]

Solaris extension adds module$ and kernel$ for variable interpolation

> let moduledir = [ Util.indent . key "moduledir" . Sep.space . quote_to_comment_or_eol ]

The moduledir setting specifies where modules from the Puppetfile will be installed
Parses /etc/modules
Parses /etc/modules.conf and /etc/conf.modules
Parses /etc/mongodb.conf

> let month = [ label "month" . store alphanum ]

> let mount_max = Build.key_value_line "mount_max" equal (store Rx.integer)

> let mount_option = [ seq "mount_option" . store /[^,= \t\n]+/ . mount_option_value? ]

Counting options

> let mount_option_value = [ label "value" . Util.del_str "=" . store /[^,= \t\n]+/ ]

> let mount_options = [ label "mount_options" . counter "mount_option" . Build.opt_list mount_option Sep.comma ]

An array of mount_options

> let mountpoint_kw = "-" (* do not mount *) | "swap" (* swap space *)

> let multi = "[Unit] After=syslog.target network.target Also=canberra-system-shutdown.service canberra-system-shutdown-reboot.service Before=sysinit.target shutdown.target CapabilityBoundingSet=CAP_SYS_ADMIN CAP_SETUID CAP_SETGID Conflicts=emergency.service emergency.target ControlGroup=%R/user/%I/shared cpu:/ ListenNetlink=kobject-uevent 1 Requires=shutdown.target umount.target final.target Sockets=udev-control.socket udev-kernel.socket WantedBy=halt.target poweroff.target Wants=local-fs.target swap.target Wants=local-fs.target \ swap.target Wants=local-fs.target\ swap.target Wants= local-fs.target "

> let multi_empty = sep_semi

key=;

> let multi_entry = [ label "values" . counter "multi" . ( multi_single | multi_values | multi_empty ) ]

List settings go under a ‘values’ node

> let multi_single = multi_value . sep_semi

key=foo; (parsed as a list)

> let multi_value = [ seq "multi" . store value_re ]

One value in a list setting

> let multi_values = multi_value . ( sep_semi . multi_value )+ . del /;?/ ";"

key=foo;bar key=foo;bar;

> let multiboot_arg = [ label "@path" . store (Rx.word . "/" . Rx.no_spaces) ]

Permits a second form for Solaris multiboot kernels that take a path (with a slash) as their first arg, e.g.

> let multiline_ace = IniFile.entry_multiline IniFile.entry_re sep_ace comment_ace

> let multiline_nl = "test_ace =\n val2\n val3\n"

> let multiline_test = "test_ace = val1\n val2\n val3\n"

Close