aboutsummaryrefslogtreecommitdiff
path: root/doc/handbook/chapters
diff options
context:
space:
mode:
Diffstat (limited to 'doc/handbook/chapters')
-rw-r--r--doc/handbook/chapters/configuration.texi74
1 files changed, 73 insertions, 1 deletions
diff --git a/doc/handbook/chapters/configuration.texi b/doc/handbook/chapters/configuration.texi
index 286c72e7a..adff956a9 100644
--- a/doc/handbook/chapters/configuration.texi
+++ b/doc/handbook/chapters/configuration.texi
@@ -1,5 +1,77 @@
1@node Configuration Handbook 1@node Configuration Handbook
2@chapter Configuration Handbook 2@chapter Configuration Handbook
3 3
4This chapter has yet to be written. It is intended to be about in-depth 4This chapter has yet to be fully written. It is intended to be about in-depth
5configuration of GNUnet. 5configuration of GNUnet.
6
7
8@menu
9* Config file format::
10@end menu
11
12
13@node Config file format
14@section Config file format
15
16In GNUnet realm, all components obey the same pattern to get configuration
17values. According to this pattern, once the component has been installed, the
18installation deploys default values in @file{$prefix/share/gnunet/config.d/},
19in @file{.conf} files. In order to override these defaults, the user can
20write a custom @file{.conf} file and either pass it to the component at
21execution time, or name it @file{gnunet.conf} and place it under
22@file{$HOME/.config/}.
23
24A config file is a text file containing sections, and each section
25contains its values. The right format follows:
26
27@example
28[section1]
29value1 = string
30value2 = 23
31
32[section2]
33value21 = string
34value22 = /path22
35@end example
36
37Throughout any configuration file, it is possible to use @code{$}-prefixed
38variables, like @code{$VAR}, especially when they represent filenames in in
39the filesystem. It is also possible to provide defaults values for those
40variables that are unset, by using the following syntax:
41
42@example
43${VAR:-default}
44@end example
45
46@noindent
47However, there are two ways a user can set @cide{$}-prefixable variables:
48(a) by defining them under a @code{[paths]} section
49
50@example
51[paths]
52GNUNET_DEPLOYMENT_SHARED = ${HOME}/shared-data
53..
54[section-x]
55path-x = ${GNUNET_DEPLOYMENT_SHARED}/x
56@end example
57
58@noindent
59or (b) by setting them in the environment
60
61@example
62$ export VAR=/x
63@end example
64
65@noindent
66The configuration loader will give precedence to variables set under
67@code{[path]}, though.
68
69The utility @samp{gnunet-config}, which gets installed along with GNUnet,
70serves to get and set configuration values without directly editing the
71@file{.conf} file. The option @samp{-f} is particularly useful to resolve
72filenames, when they use several levels of @code{$}-expanded variables.
73See @samp{gnunet-config --help}.
74
75Note that, in this stage of development, the file
76@file{$HOME/.config/gnunet.conf} can contain sections for @strong{all} the
77components.