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
D
 daemon, Hosts_Access
 daemon_list, Hosts_Access
 database
 database_kw, Nsswitch
 dayofmonth, Cron
 dayofweek, Cron
 debctrl
 debian, Grub
 DEBIAN-SPECIFIC SECTIONS, Grub
 debian_comment, Grub
 debian_comment_re, Grub
 debian_entry, Grub
 debian_footer, Grub
 debian_header, Grub
 debian_setting_re, Grub
 decimal
 decl_def_item, Test_Xml.Xml
 def, LVM
 default_approx, Test_Approx
 default_depth, Xorg
 default_sysctl, Test_Sysctl
 default_type, Sudoers
 defaults
 DEFAULTS, Sudoers
 DEFAULTS SECTION, Mke2fs
 defaults_entry, Mke2fs
 defaults_title, Mke2fs
 Define comment and defaults, IniFile
 del_negate, Sudoers
 del_opt_ws, Util
 del_str, Util
 del_ws, Util
 del_ws_spc, Util
 del_ws_tab, Util
 delay, Anacron
 delim, Util
 dels, Grub
 desc, Test_Systemd
 description, Schroot
 Description
 Desktop
 destination
 device
 device_name, Rx
 device_re, Ntpd
 Dhcpd
 discard, Syslog
 disk, FAI_DiskConfig
 disk_config
 disk_config_entry, FAI_DiskConfig
 disk_free_limit
 disk_list, FAI_DiskConfig
 disk_with_opt, FAI_DiskConfig
 display, Xorg
 DISPLAY SUBSECTION, Xorg
 display_entry, Xorg
 display_modes, Xorg
 dn, Automaster
 Dns_Zone
 do_dquote
 do_dquote_opt, Quote
 do_dquote_opt_nil, Quote
 do_quote, Quote
 do_squote, Quote
 do_squote_opt, Quote
 do_squote_opt_nil, Quote
 doc, Test_Xml.Xml
 doctype, Test_Xml.Xml
 domain, Resolv
 doseol, Util
 dot, Syslog
 double
 double_opt
 double_opt_allow_spc, Test_Quote
 double_opt_re, Quote
 Dovecot
 Dpkg
 dquote, Quote
 dquote_opt, Quote
 dquote_opt_nil
 dquote_spaces
 driver, Xorg
 duration, Xymon_Alerting
let daemon = let host = [ label "host" . Util.del_str "@" . list_item ] in [ label "process" . list_item . host? ]
let daemon_list = Build.opt_list daemon list_sep
A list of daemons
let database = [ label "database" . store database_kw . sep_colon . (Build.opt_list (service|reaction) Sep.space) . Util.comment_or_eol ]
let database = comma_sep_list "database"
TODO: support for quoted strings
let database_kw = Rx.word
The database specification like `passwd’, `shadow’, or `hosts’
let dayofmonth = [ label "dayofmonth" . store num ]
let dayofweek = [ label "dayofweek" . store alphanum ]
Parses ./debian/control
let debian = [ label "debian" . del debian_header debian_header . (debian_comment|empty|debian_entry)* . del debian_footer debian_footer ]
A debian-specific section, made of debian_entry lines
let debian_comment = [ Util.indent . label "#comment" . del /##[ \t]*/ "## " . store debian_comment_re . eol ]
A comment entry inside a debian-specific section
let debian_comment_re = /([^ \t\n].*[^ \t\n]|[^ \t\n])/ - "## End Default Options ##"
let debian_entry = [ Util.del_str "#" . Util.indent . key debian_setting_re . del /[ \t]*=/ "=" . value_to_eol? . eol ]
let debian_footer = "## ## End Default Options ##\n"
Footer for a debian-specific section
let debian_header = "## ## Start Default Options ##\n"
Header for a debian-specific section
let debian_setting_re = "kopt" | "groot" | "alternative" | "lockalternative" | "defoptions" | "lockold" | "xenhopt" | "xenkopt" | "altoptions" | "howmany" | "memtest86" | "updatedefaultentry" | "savedefault" | "indomU"
let decimal = Rx.reldecimal
let decimal = store /[0-9]+(.[0-9]+)?/
Store a decimal value
let decimal = /[0-9]+([.,][0-9]+)?/
A decimal value (using ‘,’ or ‘.’
test Xml.decl_def_item get "<!ELEMENT greeting (#PCDATA)>" = { "!ELEMENT" = "greeting" { "#decl" = "(#PCDATA)" } }
!ELEMENT declaration tags are mapped in “!ELEMENT” nodes.
An assignment, or a block containing definitions
let default_approx = "# The following are the defaults, so there is no need # to uncomment them unless you want a different value. # See approx.conf(5) for details. $interface any $port 9999 $interval 720 $max_wait 10 $max_rate unlimited $debug false # Here are some examples of remote repository mappings. # See http://www.debian.org/mirror/list for mirror sites. debian http://ftp.nl.debian.org/debian debian-volatile http://ftp.nl.debian.org/debian-volatile security http://security.debian.org "
A full configuration
let default_depth = entry_int "DefaultDepth" /[dD]efault[dD]epth/
let default_sysctl = "# Kernel sysctl configuration file # Controls IP packet forwarding net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = \t0 kernel.sysrq = 0 ; Semicolon comments are also allowed net.ipv4.tcp_mem = \t393216 524288 786432 "
let default_type = let value = store /[@:!>][^ \t\n\\]+/ in [ label "type" . value ]
Type definition for defaults
let defaults = IniFile.record defaults_title ((Util.indent . (defaults_entry|common_entry)) | comment)
A defaults section
let defaults = [ indent . key "Defaults" . default_type? . sep_cont . parameter_list . comment_or_eol ]
A Defaults entry
let defaults_entry = entry_sto "force_undo" ("true"|"false") | entry_sto "fs_type" Rx.word | entry_sto "undo_dir" Rx.fspath | list_sto "default_mntopts" (key Rx.word) | entry_sto "enable_periodic_fsck" Rx.integer
Possible entries under the defaults section
let defaults_title = IniFile.title "defaults"
Title for the defaults section
let del_negate = del /(!!)*/ ""
Delete an even number of ‘!’
let del_opt_ws = del /[ \t]*/
Delete optional whitespace
let del_str (s:string) = del s s
Delete a string and default to it
let del_ws = del /[ \t]+/
Delete mandatory whitespace
let del_ws_spc = del_ws " "
Delete mandatory whitespace, default to single space
let del_ws_tab = del_ws "\t"
Delete mandatory whitespace, default to single tab
let delay = [ label "delay" . store Rx.integer ]
The delay for an entry
let delim (op:string) = del (/[ \t]*/ . op . /[ \t]*/) (" " . op . " ")
let dels (s:string) = Util.del_str s
let desc = "[Unit] Description=RPC Description=RPC bind service Description=RPC bind\\ service Description= Resets System Activity Logs "
let description = let lang = [ Util.del_str "[" . label "lang" . store IniFile.entry_re . Util.del_str "]" ] in IniFile.entry_generic_nocomment (key "description" . lang?) sep "#" comment
Descriptions are special entries, which can have an optional lang parameter
dpkg.cfg is a simple list of options, the same ones as the command line options, with or without a value.
/etc/exports contains lines associating a directory with one or more hosts, and NFS options for each host.
Desktop module for Augeas (.desktop files)
let destination = ( word | command )
Can be either a word (no spaces included) or a command with spaces
let destination = [ label "destination" . word ]
let device = [ label "device" . store Rx.fspath ]
let device = [ command "device" "" . Sep.space . store /\([A-Za-z0-9_.-]+\)/ . spc . [ label "file" . value_to_eol ] . Util.eol ]
This is a shell-only directive in upstream grub; the grub versions in at least Fedora/RHEL use this to find devices for UEFI boot
let device = entry_str "Device" /[dD]evice/
let device_name = /[a-zA-Z0-9_?.+:!-]+/
A Linux device name like eth0 or i2c-0.
let device_re = Rx.device_name | /\*/
BIND dhcp 3 server configuration module for Augeas
let discard = [ label "discard" . Util.del_str "~" ]
discards matching messages
let disk = [ label "disk" . store /[^., \t\n]+/ . partition? ]
let disk_config = let excludes = "lvm" | "raid" | "end" | /disk[0-9]+/ | "cryptsetup" | "tmpfs" in let other_label = Rx.fspath - excludes in disk_config_entry "lvm" lvmoption volume_lvm | disk_config_entry "raid" raidoption volume_raid | disk_config_entry "tmpfs" option volume_tmpfs | disk_config_entry "end" option volume (* there shouldn't be an option here *) | disk_config_entry /disk[0-9]+/ option volume | disk_config_entry "cryptsetup" cryptoption volume_cryptsetup | disk_config_entry other_label option volume
test FAI_DiskConfig.disk_config get "disk_config hda preserve_always:6,7 disklabel:msdos bootable:3\n" = { "disk_config" = "hda" { "preserve_always" { "1" = "6" } { "2" = "7" } } { "disklabel" = "msdos" } { "bootable" = "3" } }
Test FAI_DiskConfig.disk_config
let disk_config_entry (kw:regexp) (opt:lens) (vol:lens) = [ key "disk_config" . space . store kw . (space . opt)* . eol . (volume_or_comment vol)? ]
let disk_free_limit = let value = Erlang.integer | Erlang.tuple Erlang.bare Erlang.decimal in Erlang.value "disk_free_limit" value
test Rabbitmq.disk_free_limit get "{disk_free_limit, 1000000000}" = { "disk_free_limit" = "1000000000" }
let disk_list = Build.opt_list disk_with_opt Sep.comma
A list of disk_with_opts
let disk_with_opt = [ label "disk" . store /[^:., \t\n]+/ . partition? . spare_missing* ]
A disk with a spare/missing option for raids
let display = [ indent . del "SubSection" "SubSection" . sep_spc . sep_dquote . key "Display" . sep_dquote . eol . display_entry* . indent . del "EndSubSection" "EndSubSection" . eol ]
let display_entry = entry_int "Depth" /[dD]epth/ | entry_int "FbBpp" /[fF]b[bB]pp/ | entry_rgb "Weight" /[wW]eight/ | entry_xy "Virtual" /[vV]irtual/ | entry_xy "ViewPort" /[vV]iew[pP]ort/ | display_modes | entry_str "Visual" /[vV]isual/ | entry_rgb "Black" /[bB]lack/ | entry_rgb "White" /[wW]hite/ | entry_str "Options" /[oO]ptions/ | empty | comment
Known values for entries in the Display subsection
let display_modes = [ indent . del /[mM]odes/ "Modes" . label "Modes" . [ label "mode" . sep_spc . quoted_non_empty_string_val ]+ . eol ]
let dn = /[^:# \n\t]+/
Lens for parsing DNS zone files
let do_dquote = Quote.do_dquote
let do_dquote (body:lens) = square dquote body dquote
Enclose a lens in dquotes
let do_dquote_opt (body:lens) = square dquote_opt body dquote_opt
Enclose a lens in optional dquotes, use dquotes by default.
let do_dquote_opt_nil (body:lens) = square dquote_opt_nil body dquote_opt_nil
Enclose a lens in optional dquotes, default to no quotes.
let do_quote (body:lens) = square quote body quote
Enclose a lens in quotes.
let do_squote (body:lens) = square squote body squote
Enclose a lens in squotes
let do_squote_opt (body:lens) = square squote_opt body squote_opt
Enclose a lens in optional squotes, use squotes by default.
let do_squote_opt_nil (body:lens) = square squote_opt_nil body squote_opt_nil
Enclose a lens in optional squotes, default to no quotes.
test Xml.doc get input1 = { "#declaration" { "#attribute" { "version" = "1.0" } { "encoding" = "UTF-8" } } } { "html" { "#text" = "\r\n " } { "head" { "#text" = "\n " } { "title" { "#text" = "Wiki" } } { "#text" = " " } } { "#text" = " " } { "body" { "#text" = " " } { "h1" { "#text" = "Augeas" } } { "#text" = " " } { "p" { "#attribute" { "class" = "main" } } { "#text" = "Augeas is now able to parse XML files!" } } { "#text" = " " } { "ul" { "#text" = "\n " } { "li" { "#text" = "Translate from XML to a tree syntax" } } { "#text" = " " } { "li" { "#text" = "Translate from the tree back to XML" } } { "#text" = " " } { "#comment" = " this is some comment " } { "#text" = " " } { "li" { "#text" = "this" } } { "#text" = " " } } { "#text" = " " } } }
Test input1 with Xml.doc
test Xml.doctype get "<!DOCTYPE greeting:foo SYSTEM \"hello.dtd\">" = { "!DOCTYPE" = "greeting:foo" { "SYSTEM" = "hello.dtd" } }
!DOCTYPE tags are mapped in “!DOCTYPE” nodes.
let domain = Build.key_value_line_comment "domain" Sep.space (store Rx.word) comment_eol
let doseol = del /[ \t]*\r?\n/ "\n"
Delete end of line with optional carriage return, including optional trailing whitespace
let dot = Util.del_str "."
Deletes a dot and default to it
let double = let body = store /[^\n]*/ in do_dquote body
A double-quoted value
let double = [ label "double" . Quote.double ]
let double_opt = let body = store double_opt_re in do_dquote_opt body
An optionally double-quoted value Double quotes are not allowed in value Value cannot begin or end with spaces
let double_opt = [ label "double_opt" . Quote.double_opt ]
let double_opt_allow_spc = let body = store /[^\n"]+/ in [ label "double" . Quote.do_dquote_opt body ]
let double_opt_re = /[^\n\t "]([^\n"]*[^\n\t "])?/
The regexp to store when value is optionally double-quoted
Parses dovecot configuration files.
Parses /etc/dpkg/dpkg.cfg
let dquote = Util.del_str "\""
A double quote
let dquote_opt = del /"?/ "\""
An optional double quote, default to double
let dquote_opt_nil = del /"?/ ""
An optional double quote, default to nothing
let dquote_opt_nil = let body = store Quote.double_opt_re in [ label "dquote_opt_nil" . Quote.do_dquote_opt_nil body ]?
let dquote_spaces (lns1:lens) (lns2:lens) =
Make double quotes mandatory if value contains spaces, and optional if value doesn’t contain spaces.
let dquote_spaces (lns:lens) =
Make double quotes mandatory if value contains spaces, and optional if value doesn’t contain spaces.
let driver = entry_str "Driver" /[dD]river/
let duration = [ key "DURATION" . [ label "operator" . comparison ] . [ label "value" . store_word ] ]
The duration filter definition
Close