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
N
 NagiosConfig
 NagiosObjects
 name
 name_re, AptConf
 name_re_colons, AptConf
 named_block
 named_block_arg, Keepalived
 named_block_arg_title, Keepalived
 nameserver, Resolv
 neg1, Rx
 negate_node, Sudoers
 netgroup, Access
 netmask, Resolv
 Netmasks
 NetworkManager
 Networks
 new_conf
 nexthop, Postfix_Transport
 nexthop_smtp, Postfix_Transport
 Nginx
 nil cases, Test_Quote
 no_colon, Channels
 no_semicolon, Channels
 no_space, Chrony
 no_spaces, Rx
 nocomma, Test_Aliases
 nocull, Cachefilesd
 nondef, LVM
 Not supported, Xymon_Alerting
 notation_def, Test_Xml.Xml
 notice, Xymon_Alerting
 Nrpe
 Nsswitch
 Ntpd
 num, Cron
 number
 number_re, Postgresql
O
 octal, Rx
 OpenShift_Config
 OpenShift_Http
 OpenShift_Quickstarts
 opt_eol, Keepalived
 opt_hash, Syslog
 opt_list
 opt_plus, Syslog
 opt_space
 opt_tab, Sep
 opt_value, Ntpd
 opt_ws, Grub
 option
 option_kw, Hosts_Access
 options
 Options with multiple values, Chrony
 optsep, Automaster
 optval, Crypttab
 org, Desktop.Freedesktop
 origin_list, Access
 origin_pin, AptPreferences
Parses /etc/{nagios{3,},icinga}/*.cfg
Parses /etc/{nagios{3,},icinga}/objects/*.cfg
let name = /([^ \t\n#:|@]+|"[^"|\n]*")/ (* " make emacs calm down *)
let name = /[^: \t\n]+/
let name = /[^@%# \t\n][^ \t\n]*/
let name = [ label "name" . store /[^\/ \t\n]+/ ]
LVM volume group name
let name = [ label "name" . sto_to_col? . colon ]
pw_gecos; the user’s full name
let name_re = /[A-Za-z][A-Za-z-]*/
Regex for entry names
let name_re_colons = /[A-Za-z][A-Za-z:-]*/
Regex for entry names with colons
let named_block (kw:regexp) (entry:lens) = [ key kw . block entry . eol ]
A named block enclosed in brackets
let named_block (kw:string) (sto:lens) = lens_block (key kw . sep_spc . sto_word) sto
A block with a block title and name
let named_block = Build.named_block "foo" block_entry
The named block used for testing
let named_block_arg (kw:string) (name:string) (arg:string) (sto:lens) = lens_block (named_block_arg_title kw name arg) sto
A block with a block title, a name and an argument
let named_block_arg_title (kw:string) (name:string) (arg:string) = key kw . sep_spc . [ label name . sto_word ] . sep_spc . [ label arg . sto_word ]
A title lens for named_block_arg
let nameserver = Build.key_value_line_comment "nameserver" Sep.space (store Rx.ip) comment_eol
A nameserver entry
let neg1 = /[^,# \n\t]+/
Anything but a space, a comma or a comment sign
let negate_node = [ del "!" "!" . label "negate" ]
Negation of boolean values for defaults.
let netgroup = [ label "netgroup" . Util.del_str "@" . store user_re . [ label "nisdomain" . Util.del_str "@@" . store Rx.word ]? ]
Format is @NETGROUP[@@NISDOMAIN]
let netmask = [ label "netmask" . Util.del_str "/" . store Rx.ip ]
A network mask for IP addresses
Parses /etc/inet/netmasks on Solaris
Parses /etc/NetworkManager/system-connections/* files which are GLib key-value setting files.
Parses /etc/networks
let new_conf = " ACTIVEMQ_HOME=/usr/local/share/activemq ACTIVEMQ_BASE=${ACTIVEMQ_HOME} "
let new_conf = "<beans> <broker xmlns=\"http://activemq.apache.org/schema/core\" brokerName=\"localhost\" dataDirectory=\"${activemq.data}\"> <transportConnectors> <transportConnector name=\"openwire\" uri=\"tcp://127.0.0.1:61616\"/> </transportConnectors> </broker> </beans> "
let new_conf = "### Comment admin: password, admin "
let new_conf = "# Comment admin readonly "
let new_conf = "# Comment admin password "
let new_conf = "CLOUD_DOMAIN=\"rhcloud.com\" VALID_GEAR_SIZES=\"small,medium\" DEFAULT_MAX_GEARS=\"100\" DEFAULT_GEAR_CAPABILITIES=\"small\" DEFAULT_GEAR_SIZE=\"small\" MONGO_HOST_PORT=\"localhost:27017\" MONGO_USER=\"openshift\" MONGO_PASSWORD=\"mooo\" MONGO_DB=\"openshift_broker_dev\" MONGO_SSL=\"false\" ENABLE_USAGE_TRACKING_DATASTORE=\"false\" ENABLE_USAGE_TRACKING_AUDIT_LOG=\"false\" USAGE_TRACKING_AUDIT_LOG_FILE=\"/var/log/openshift/broker/usage.log\" ENABLE_ANALYTICS=\"false\" ENABLE_USER_ACTION_LOG=\"true\" USER_ACTION_LOG_FILE=\"/var/log/openshift/broker/user_action.log\" AUTH_PRIVKEYFILE=\"/etc/openshift/server_priv.pem\" AUTH_PRIVKEYPASS=\"\" AUTH_PUBKEYFILE=\"/etc/openshift/server_pub.pem\" AUTH_RSYNC_KEY_FILE=\"/etc/openshift/rsync_id_rsa\" AUTH_SCOPE_TIMEOUTS=\"session=1.days|7.days, *=1.months|6.months\" ENABLE_MAINTENANCE_MODE=\"false\" MAINTENANCE_NOTIFICATION_FILE=\"/etc/openshift/outage_notification.txt\" DOWNLOAD_CARTRIDGES_ENABLED=\"false\" "
let new_conf = "Listen 127.0.0.1:8080 User nobody Group apache include /etc/httpd/conf.d/ruby193-passenger.conf PassengerUser apache PassengerMaxPoolSize 80 PassengerMinInstances 2 PassengerPreStart http://127.0.0.1:8080/ PassengerUseGlobalQueue off RackBaseURI /broker PassengerRuby /var/www/openshift/broker/script/broker_ruby <Directory /var/www/openshift/broker/httpd/root/broker> Options -MultiViews </Directory> "
let new_conf = "[ {\"quickstart\": { \"id\": \"1\", \"name\":\"CakePHP\", \"website\":\"http://cakephp.org/\", \"initial_git_url\":\"git://github.com/openshift/cakephp-example.git\", \"cartridges\":[\"php-5.4\",\"mysql-5.1\"], \"summary\":\"CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.\", \"tags\":[\"php\",\"cakephp\",\"framework\"], \"admin_tags\":[] }}, {\"quickstart\": { \"id\": \"2\", \"name\":\"Django\", \"website\":\"https://www.djangoproject.com/\", \"initial_git_url\":\"git://github.com/openshift/django-example.git\", \"cartridges\":[\"python-2.7\"], \"summary\":\"A high-level Python web framework that encourages rapid development and clean, pragmatic design. Administrator user name and password are written to $OPENSHIFT_DATA_DIR/CREDENTIALS.\", \"tags\":[\"python\",\"django\",\"framework\"], \"admin_tags\":[] }}, {\"quickstart\":{ \"id\": \"4\", \"name\":\"Drupal\", \"website\":\"http://drupal.org/\", \"initial_git_url\":\"git://github.com/openshift/drupal-example.git\", \"cartridges\":[\"php-5.4\",\"mysql-5.1\"], \"summary\":\"An open source content management platform written in PHP powering millions of websites and applications. It is built, used, and supported by an active and diverse community of people around the world. Administrator user name and password are written to $OPENSHIFT_DATA_DIR/CREDENTIALS.\", \"tags\":[\"php\",\"drupal\",\"wiki\",\"framework\",\"instant_app\"], \"admin_tags\":[] }}, {\"quickstart\":{ \"id\": \"6\", \"name\":\"Ruby on Rails\", \"website\":\"http://rubyonrails.org/\", \"initial_git_url\":\"git://github.com/openshift/rails-example.git\", \"cartridges\":[\"ruby-1.9\",\"mysql-5.1\"], \"summary\":\"An open source web framework for Ruby that is optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration.\", \"tags\":[\"ruby\",\"rails\",\"framework\"], \"admin_tags\":[] }}, {\"quickstart\":{ \"id\": \"8\", \"name\":\"WordPress\", \"website\":\"https://wordpress.org\", \"initial_git_url\":\"git://github.com/openshift/wordpress-example.git\", \"cartridges\":[\"php-5.4\",\"mysql-5.1\"], \"summary\":\"A semantic personal publishing platform written in PHP with a MySQL back end, focusing on aesthetics, web standards, and usability. Administrator user name and password are written to $OPENSHIFT_DATA_DIR/CREDENTIALS.\", \"tags\":[\"php\",\"wordpress\",\"blog\",\"framework\",\"instant_app\"], \"admin_tags\":[] }} ]"
let nexthop = let host_re = "[" . Rx.word . "]" | /[A-Za-z]([^\n]*[^ \t\n])?/ in [ label "nexthop" . (store host_re)? ]
let nexthop_smtp = let host_re = "[" . Rx.word . "]" | Rx.word in [ label "host" . store host_re ] . colon . [ label "port" . store Rx.integer ]
Nginx module for Augeas
let no_colon = /[^: \t\n][^:\n]*[^: \t\n]|[^:\n]/
let no_semicolon = /[^;\n]+/
let no_space = /[^ \t\r\n!;#%]+/
No spaces or comment characters
let no_spaces = /[^ \t\r\n]+/
A string with no spaces
let nocomma = "alias: target1,target2\n"
Don’t have to have whitespace after a comma
let nocull = /nocull/i
The nocull key has different syntax than the rest
let nondef = Util.empty | Util.comment
A line that doesn’t contain a statement
File inclusion are not followed
test Xml.notation_def get "<!NOTATION not3 SYSTEM \"\">" = { "!NOTATION" = "not3" { "SYSTEM" = "" } }
let notice = flag "NOTICE"
The notice filter definition
Parses nagios-nrpe configuration files.
Parses /etc/nsswitch.conf
Parses OpenNTPD’s ntpd.conf
let num = /[0-9*][0-9\/,*-]*/
let number = integer | decimal
let number = Quote.do_squote_opt (store number_re)
Storing number_re, with or without quotes
let number_re = Rx.reldecimal . /[kMG]?B|[m]?s|min|h|d/?
A relative decimal number, optionally with unit
let octal = /0[0-7]+/
An octal value
Parses
Parses HTTPD related files specific to openshift
Parses
let opt_eol = del /[ \t]*\n?/ " "
let opt_hash = del /#?/ ""
deletes an optional # sign
let opt_list (lns:lens) (sep:lens) = lns . ( sep . lns )*
Same as list, but there might be only one element in the list
let opt_list (lns:lens) = rspace lbrack . (Build.opt_list lns (lrspace comma) . space)? . Util.del_str rbrack
An optional list of elements, in square brackets
let opt_list = Build.opt_list [ key Rx.word ] Sep.space
let opt_plus = del /\+?/ ""
deletes an optional + sign
let opt_space = /[ \t]*/
An optional space or tab
let opt_space = del Rx.opt_space ""
Deletes a Rx.opt_space and default to an empty string
let opt_tab = del Rx.opt_space "\t"
Deletes a Rx.opt_space and default to a tab
let opt_value (s:string) (r:regexp) = Build.key_value s space (store r)
A subnode for optional values.
let opt_ws = Util.del_opt_ws ""
let option = let kv_re = "command" | "environment" | "from" | "permitopen" | "principals" | "tunnel" in let flag_re = "cert-authority" | "no-agent-forwarding" | "no-port-forwarding" | "no-pty" | "no-user-rc" | "no-X11-forwarding" in let option_value = Util.del_str "\"" . store /((\\\\")?[^\\\n"]*)+/ . Util.del_str "\"" in Build.key_value kv_re Sep.equal option_value | Build.flag flag_re
A key option
let option =
let option = [ key option_kw . ( del /([ \t]*=[ \t]*|[ \t]+)/ " " . sto_to_colon )? ]
Optional extensions defined in hosts_options(5)
let option = let value_start = label "value" . Sep.equal in [ label "option" . store Rx.word . (Quote.quote_spaces value_start)? ]
part of method
let option = [ indent . del /[oO]ption/ "Option" . label "Option" . sep_spc . quoted_string_val . [ label "value" . sep_spc . quoted_string_val ]* . eol ]
let option_kw = "severity" | "spawn" | "twist" | "keepalive" | "linger" | "rfc931" | "banners" | "nice" | "setenv" | "umask" | "user" | /allow/i | /deny/i
Since either an option or a shell command can be given, use an explicit list of known options to avoid misinterpreting a command as an option
let options = let opt_value = /[^#" \t\n\\\\]+|"[^#"\n\\\\]*"/ in let option = [ key Rx.word . (del /[ \t]*=[ \t]*/ "=" . store opt_value)? ] in [ key "options" . sep_space . sto_no_spaces . (sep_space . option)* . Util.comment_or_eol ]
let options = let options_entry = Build.key_value ("ndots"|"timeout"|"attempts") (Util.del_str ":") (store Rx.integer) | Build.flag ("debug"|"rotate"|"no-check-names" |"inet6"|"ip6-bytestring"|"edns0" |"single-request-reopen") | ip6_dotint in Build.key_value_line_comment "options" Sep.space (Build.opt_list options_entry Sep.space) comment_eol
Options values
let options = "# Example options no-pty ssh-dsa AAAA no-pty ssh-ed25519 AAAA no-pty,command=\"foo\" ssh-dsa AAAA no-pty,command=\"foo bar\" ssh-dsa AAAA no-pty,from=\"example.com,10.1.1.0/16\" ssh-dsa AAAA no-pty,environment=\"LANG=en_GB.UTF8\" ssh-dsa AAAA "
Each of these gets their own parsing block
let optsep = del /[ \t,]+/ ","
let optval = /[A-Za-z0-9_.:-]+/
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
let origin_list = let origin_re = Rx.no_spaces - /[Ee][Xx][Cc][Ee][Pp][Tt]/ in Build.opt_list [ label "origin" . store origin_re ] Sep.space
origin_list can be a single ipaddr/originname/domain/fqdn or a list of those values
let origin_pin = pin_gen "origin"
Close