Parses /etc/system on Solaris
Author: Dominic Cleal dcl@redha t.com eal
Solaris_System | Parses /etc/system on Solaris |
Reference | This lens tries to keep as close as possible to `man 4 system` where possible. |
Licence | This file is licensed under the LGPL v2+, like the rest of Augeas. |
Lens Usage | |
Configuration files | This lens applies to /etc/system on Solaris. |
USEFUL PRIMITIVES | |
comment | |
empty | Map empty lines, including empty asterisk comments |
sep_colon | The separator for key/value entries |
sep_moddir | The separator of directories in a moddir search path |
modpath | Individual moddir search path entry |
set_operator | Valid set operators: equals, bitwise AND and OR |
set_value | Sets an integer value or char pointer |
COMMANDS | |
cmd_kv | Function for simple key/value setting commands such as rootfs |
cmd_moddir | The moddir command for specifying module search paths |
set_var | Loads the variable name from a set command, no module |
set_var | Loads the module and variable names from a set command |
set_sep_spc | |
cmd_set | The set command for individual kernel/module parameters |
LENS | |
lns | |
filter |
This lens applies to /etc/system on Solaris. See filter.
let comment = Util.comment_generic /[ \t]*\*[ \t]*/ "* "
Map empty lines, including empty asterisk comments
let empty = [ del /[ \t]*\*?[ \t]*\n/ "\n" ]
The separator for key/value entries
let sep_colon = del /:[ \t]*/ ": "
The separator of directories in a moddir search path
let sep_moddir = del /[: ]+/ " "
Individual moddir search path entry
let modpath = [ seq "modpath" . store /[^ :\t\n]+/ ]
Valid set operators: equals, bitwise AND and OR
let set_operators = /[=&|]/
Sets an integer value or char pointer
let set_value = [ label "value" . store Rx.no_spaces ]
Function for simple key/value setting commands such as rootfs
let cmd_kv (cmd:string) (value:regexp) = Build.key_value_line cmd sep_colon (store value)
The moddir command for specifying module search paths
let cmd_moddir = Build.key_value_line "moddir" sep_colon (Build.opt_list modpath sep_moddir)
Loads the variable name from a set command, no module
let set_var = [ label "variable" . store Rx.word ]
let set_sep_spc = Util.del_opt_ws " "
The set command for individual kernel/module parameters
let cmd_set = [ key "set" . Util.del_ws_spc . ( set_var | set_varmod ) . set_sep_spc . [ label "operator" . store set_operators ] . set_sep_spc . set_value . Util.eol ]
let lns = ( empty | comment | cmd_moddir | cmd_kv "rootdev" Rx.fspath | cmd_kv "rootfs" Rx.word | cmd_kv "exclude" Rx.fspath | cmd_kv "include" Rx.fspath | cmd_kv "forceload" Rx.fspath | cmd_set )*