|
Elektra
0.8.25
|
This plugin reads and writes files written in a basic line-oriented ini-like format. It is very simplistic without sections, the ini plugin and for specifications the ni plugin should be preferred in most cases. Since the simpleini plugin requires the GNU C library it will not work on operating systems that use another C library such as macOS.
It is quite suitable to export configuration if you want line-by-line key, value pairs without sections or metadata. (Thus +3000 in status)
$ kdb export system/samba simpleini
The only parameter simpleini supports is format which allows you to change the syntax of individual lines. The format is a string with any characters where only % has special meaning:
% in an even number N are escaped and represent N/2 %, e.g. %%%% are actually %% in the resulting format.% represents the key.% represents the value.The default is % = %.
For example, if you want every key to be marked %:key value you would use:
$ kdb export -c "format=%%:% %" system/samba simpleini %:key value %:key2 value2
format) and the null plugin is used to handle null values.Mount the plugin:
$ kdb mount -d /etc/samba/smb.conf system/samba ccode null simpleini
1.8.13