Using m4 to build aide.conf files

From Tom
Revision as of 12:04, 5 February 2016 by Tom (Talk | contribs) (Minor edit)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Creating the /etc/aide.conf file can be very time consuming process. In order to simplify this process (if for no one but me), I've created an set of m4 macros that can be used to build the /etc/aide.conf file.

The m4 macros attempt to be directory independent where they are installed. The only m4 macro file that needs to include the full path to any other file is the host dependent file called aide.m4. It needs to point to the full path to the init.m4 file. All other files are relative locations to this file.

There is one host dependent file called aide.m4 that is source to the m4 macros, and a collection of OS dependent and Application dependent macros that AIDE:data/cf/aide.m4 calls to generate the host dependent /etc/aide.conf file. Here is a simple example of a aide.m4 file:

# Comments

# The following include must be the first configuration option, and
# must be the full path name to the init.m4 file.
VERSIONID(`$Id: aide.m4 1220 2014-12-19 00:37:50Z tom $')


entry(`ignore', `/dir1/')
entry(`ignore', `/dir2/')
entry(`ignore', `/dir3/')

entry(`search', `/dir1$',		`STATIC_DIR')
entry(`search', `/dir2$',		`VARIABLE_DIR')
entry(`search', `/dir3$',		`VARIABLE_DIR')

entry(`search', `/dir1/',		`EVERYTHING')
entry(`search', `/dir2/',		`LOG')
entry(`search', `/dir3/',		`STATIC_DATA')

COMMENT(`The call to build must be the last line in the file.')


--Tom Stevenson (talk) 11:03, 5 February 2016 (EST)

Help contents:

Reading: Go | Search | URL | Namespace | Page name | Section | Link | Backlinks | Piped link | Interwiki link | Redirect | Variable | Category | Special page
Tracking changes: Recent | (enhanced) | Related | Watching pages | Page history | Diff | User contributions | Edit summary | Minor edit | Patrolled edit
Logging in and preferences: Logging in | Preferences | User style
Editing: Overview | Wikitext | New page | List | Images/files | Image page | Special characters | Formula | Table | EasyTimeline | Inputbox | Template | (p. 2) | Renaming (moving) a page | Editing shortcuts | Talk page | Testing | Export | Import | rlc |