# Up2date

Parses /etc/sysconfig/rhn/up2date

Author: Raphael Pinson rap.nosp@m.hink@gmai.nosp@m.l.com

Summary

Up2date | Parses /etc/sysconfig/rhn/up2date
Reference | This lens tries to keep as close as possible to `man 5 up2date` where possible.
License | This file is licenced under the LGPLv2+, like the rest of Augeas.
Lens Usage | To be documented
Configuration files | This lens applies to /etc/sysconfig/rhn/up2date.
Examples | The Test_Up2date file contains various examples and tests.
USEFUL PRIMITIVES |
key_re |
value_re |
sep_semi |
ENTRIES |
single_entry | key=foo
multi_empty | key=;
multi_value | One value in a list setting
multi_single | key=foo; (parsed as a list)
multi_values | key=foo;bar key=foo;bar;
multi_entry | List settings go under a ‘values’ node
entry |
LENS |
lns |
filter |

### Reference

This lens tries to keep as close as possible to `man 5 up2date` where possible.

### License

This file is licenced under the LGPLv2+, like the rest of Augeas.

### Lens Usage

To be documented

### Configuration files

This lens applies to /etc/sysconfig/rhn/up2date. See filter.

### Examples

The Test_Up2date file contains various examples and tests.

### USEFUL PRIMITIVES

### key_re

> let key_re = /[^=# \t\n]+/

### value_re

> let value_re = /[^ \t\n;][^\n;]*[^ \t\n;]|[^ \t\n;]/

### sep_semi

> let sep_semi = Sep.semicolon

### ENTRIES

### single_entry

> let single_entry = [ label "value" . store value_re ]

key=foo

### multi_empty

> let multi_empty = sep_semi

key=;

### multi_value

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

One value in a list setting

### multi_single

> let multi_single = multi_value . sep_semi

key=foo; (parsed as a list)

### multi_values

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

key=foo;bar key=foo;bar;

### multi_entry

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

List settings go under a ‘values’ node

### entry

> let entry = [ seq "entry" . store key_re . Sep.equal . ( multi_entry | single_entry )? . Util.eol ]

### LENS

### lns

> let lns = (Util.empty | Util.comment | entry)*

### filter

Provides unit tests and examples for the Up2date lens.

> let key_re = /[^=# \t\n]+/

> let value_re = /[^ \t\n;][^\n;]*[^ \t\n;]|[^ \t\n;]/

> let sep_semi = Sep.semicolon

> let single_entry = [ label "value" . store value_re ]

key=foo

> let multi_empty = sep_semi

key=;

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

One value in a list setting

> let multi_single = multi_value . sep_semi

key=foo; (parsed as a list)

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

key=foo;bar key=foo;bar;

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

List settings go under a ‘values’ node

> let entry = [ seq "entry" . store key_re . Sep.equal . ( multi_entry | single_entry )? . Util.eol ]

> let lns = (Util.empty | Util.comment | entry)*

Close