5.7 Default keys

The [DEFAULT] section may contain a special <keys> option/setting pair that can be used to provide a default list of section keys to use to obtain options. <keys> found in sections other than [DEFAULT] are ignored.

For example:

# system.ini
[DEFAULT]
<keys> = RACK0,DEV1
desc = 'default description'
[RACK0]
desc = 'main rack'
path[DEV0] = 192.168.0.0
path[DEV1] = 192.168.0.1

Is equivalent to:

# system.ini
[DEFAULT]
path = 192.168.0.1
desc = 'main rack'
[RACK0]
desc = 'main rack'
path[DEV0] = 192.168.0.0
path[DEV1] = 192.168.0.1

This provides a convenient mechanism for the user to quickly make default selections without needing to reorganize or copy sections of the configuration file. The <keys> keys list may contain many keys and need not be an exact section name. Order is important but in the example above it could have been reversed with no ill effect. See "Keys" (section 6) for more information.