Elektra
0.9.10
|
The install-config-file
tool makes using Elektra for a configuration file easier. Please refer to its man page for details on its syntax.
It is especially useful in the context of package upgrades. In this case
their
is the current version of the maintainer's copy of a configuration file,base
is the previous version of the maintainer's copy of the configuration file.our
is the user's copy of the configuration file, derived from base
First of all, we create a small example configuration file. To do so, we first create a temporary file and store its location in Elektra.
The following call to kdb install-config-file
will mount it at system:/tests/installing
and additionally create a copy of it. The copy will be required for a three-way merge later on.
We can now safely make changes to our configuration.
Let's assume that we've downloaded a different version of this file from the internet and placed it into the directory /tmp/new
. At this point we can use kdb install-config-file
to merge the changes of this downloaded version into the configuration that we currently store in Elektra.
Note the slash /
in the beginning of the second parameter of the call to kdb install-config-file
. This tool uses kdb mount
and in consequence also the resolver. You have to enter the paths accordingly. Read the tutorials on mounting and namespaces if you are not sure what this means.
We can check that this worked by calling
Finally, we use the following commands to clean up our tutorial.