
\begin{DoxyItemize}
\item infos = Information about the blockresolver plugin is in keys below
\item infos/author = Name \href{mailto:name@libelektra.org}{\tt name@libelektra.\+org}
\item infos/licence = B\+S\+D
\item infos/needs =
\item infos/provides = resolver
\item infos/recommends =
\item infos/placements = rollback getresolver setresolver commit
\item infos/status = maintained conformant compatible coverage specific unittest tested nodep libc configurable preview experimental difficult unfinished concept
\item infos/metadata =
\item infos/description =
\end{DoxyItemize}

The {\ttfamily blockresolver} can be used to only resolved a tagged block inside a configuration file.

\subsubsection*{Implementation details}

{\ttfamily blockresolver} extracts the requested block from the configurations file and writes it into a temporary file. Afterwards Elektra will only work on the temporary file until kdb\+Set is called. On kdb\+Set the contents of the temporary file will be merged with parts outside of the requested block from the original file.

\subsection*{Usage}

{\ttfamily kdb mount -\/\+R blockresolver /path/to/my/file /mountpoint -\/c identifier=\char`\"{}identifier-\/tag\char`\"{}}

where {\ttfamily identifier} specifies the tag {\ttfamily blockresolver} will search for in the configuration file.

A block consists of 2 parts\+:
\begin{DoxyItemize}
\item beginning\+: the identifier suffixed with {\ttfamily start}
\item end\+: the identifier suffixed with {\ttfamily stop}
\end{DoxyItemize}

\subsection*{Limitations}

Currently the identifier must be unique.

\subsection*{Example}

``` \% cat /tmp/test.block bla bla bla \subsubsection*{block config start}

\mbox{[}section1\mbox{]} key1 = val1 \mbox{[}section2\mbox{]} key2 = val2 \subsubsection*{block config stop}

asdf asdf asdf

\% kdb mount -\/\+R blockresolver /tmp/test.block system/blocktest -\/c identifier=\char`\"{}\#\#\# block config\char`\"{} \% kdb export system/blocktest \mbox{[}section1\mbox{]} key1 = val1 \mbox{[}section2\mbox{]} key2 = val2

\% kdb set system/blocktest/section1/key12 val12 Create a new key system/blocktest/section1/key12 with string val12

\% cat /tmp/test.block bla bla bla \subsubsection*{block config start}

\mbox{[}section1\mbox{]} key1 = val1 key12 = val12 \mbox{[}section2\mbox{]} key2 = val2 \subsubsection*{block config stop}

asdf asdf asdf ``` 