Skip to content

Common patterns

raphink edited this page Jan 4, 2013 · 1 revision

This page lists useful common patterns to help developing Augeas lenses. Most of these lenses could probably be included into generic modules to be called from new modules later on.

Table of Contents

Ini file

Format example

 # This is an Ini file
 
 [SECTION1]
 field1 = value1
 # another comment 
 
 [section2]
 # a third comment
 field2 = value2

Example implementation

There is a generic module for Ini files on Generic_modules/IniFile.

Logrotate / xinetd

Format example

Example implementation

Comments

Comments are one of the hardest patterns to deal with in Augeas. See the Dealing with comments page for more information.