# Solaris_System

Parses /etc/system on Solaris

Author: Dominic Cleal dcl.nosp@m.eal@redha.nosp@m.t.com

Summary

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 |

### 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. See filter.

### USEFUL PRIMITIVES

### comment

> let comment = Util.comment_generic /[ \t]*\*[ \t]*/ "* "

### empty

> let empty = [ del /[ \t]*\*?[ \t]*\n/ "\n" ]

Map empty lines, including empty asterisk comments

### sep_colon

> let sep_colon = del /:[ \t]*/ ": "

The separator for key/value entries

### sep_moddir

> let sep_moddir = del /[: ]+/ " "

The separator of directories in a moddir search path

### modpath

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

Individual moddir search path entry

### set_operator

> let set_operators = /[=&|]/

Valid set operators: equals, bitwise AND and OR

### set_value

> let set_value = [ label "value" . store Rx.no_spaces ]

Sets an integer value or char pointer

### COMMANDS

### cmd_kv

> let cmd_kv (cmd:string) (value:regexp) = Build.key_value_line cmd sep_colon (store value)

Function for simple key/value setting commands such as rootfs

### cmd_moddir

> let cmd_moddir = Build.key_value_line "moddir" sep_colon (Build.opt_list modpath sep_moddir)

The moddir command for specifying module search paths

### set_var

> let set_var = [ label "variable" . store Rx.word ]

Loads the variable name from a set command, no module

### set_var

> let set_varmod = [ label "module" . store Rx.word ] . Util.del_str ":" . set_var

Loads the module and variable names from a set command

### set_sep_spc

> let set_sep_spc = Util.del_opt_ws " "

### cmd_set

> 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 ]

The set command for individual kernel/module parameters

### LENS

### lns

> 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 )*

### filter

> let comment = Util.comment_generic /[ \t]*\*[ \t]*/ "* "

> let empty = [ del /[ \t]*\*?[ \t]*\n/ "\n" ]

Map empty lines, including empty asterisk comments

> let sep_colon = del /:[ \t]*/ ": "

The separator for key/value entries

> let sep_moddir = del /[: ]+/ " "

The separator of directories in a moddir search path

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

Individual moddir search path entry

> let set_operators = /[=&|]/

Valid set operators: equals, bitwise AND and OR

> let set_value = [ label "value" . store Rx.no_spaces ]

Sets an integer value or char pointer

> let cmd_kv (cmd:string) (value:regexp) = Build.key_value_line cmd sep_colon (store value)

Function for simple key/value setting commands such as rootfs

> let cmd_moddir = Build.key_value_line "moddir" sep_colon (Build.opt_list modpath sep_moddir)

The moddir command for specifying module search paths

> let set_var = [ label "variable" . store Rx.word ]

Loads the variable name from a set command, no module

> let set_sep_spc = Util.del_opt_ws " "

> 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 ]

The set command for individual kernel/module parameters

> 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 )*

Close