aboutsummaryrefslogtreecommitdiff
path: root/contrib/packages/alpine/gnunet/gnunet-gns-proxy.initd
diff options
context:
space:
mode:
authorAlessio Vanni <vannilla@firemail.cc>2021-04-24 17:29:42 +0200
committerAlessio Vanni <vannilla@firemail.cc>2021-04-24 17:29:42 +0200
commit8233e282046e27de57de75f175e131a974087618 (patch)
treefba261f13d3a6225221a42082f561a3152969f82 /contrib/packages/alpine/gnunet/gnunet-gns-proxy.initd
parent3cd24823660a0447e590ff352e9da7eb076b292b (diff)
downloadgnunet-8233e282046e27de57de75f175e131a974087618.tar.gz
gnunet-8233e282046e27de57de75f175e131a974087618.zip
Swap gnunet-config's default behaviour for the rewrite flag
With the previous default, a configuration file could keep values different from the defaults even when the user did not explicitly edit that option, potentially leading to buggy behaviour. For example: GNUnet's version X+1 changes the default value for a certain option A, but anyone who has edited the configuration file with version X or earlier, would still have got the old default for A even when updating to version X+1. It was possible to write only the edited parts, but that required explicitly passing the `--rewrite' (or `-w') flag. The default behaviour has now been swapped so that the resulting file contains only differences, while a "frozen" configuration is generated with the `--rewrite' flag. Also, as it's a minor change: a function used internally by the logging component was using translated strings to check the requested log level. This behaviour is buggy as passing an untranslated string to e.g. `GNUNET_log_setup', while the current locale is different and a translation for that string exists, would generate a different log level than the one requested.
Diffstat (limited to 'contrib/packages/alpine/gnunet/gnunet-gns-proxy.initd')
-rw-r--r--contrib/packages/alpine/gnunet/gnunet-gns-proxy.initd3
1 files changed, 0 insertions, 3 deletions
diff --git a/contrib/packages/alpine/gnunet/gnunet-gns-proxy.initd b/contrib/packages/alpine/gnunet/gnunet-gns-proxy.initd
index 3c5a22ee2..2a4dcc1c4 100644
--- a/contrib/packages/alpine/gnunet/gnunet-gns-proxy.initd
+++ b/contrib/packages/alpine/gnunet/gnunet-gns-proxy.initd
@@ -21,12 +21,10 @@ start() {
21 # Customize gnunet.conf 21 # Customize gnunet.conf
22 port=$((8000+$(id -u $user))) 22 port=$((8000+$(id -u $user)))
23 gnunet-config -c /home/$user/.config/gnunet.conf \ 23 gnunet-config -c /home/$user/.config/gnunet.conf \
24 --rewrite \
25 --section=gns-proxy \ 24 --section=gns-proxy \
26 --option=IMMEDIATE_START \ 25 --option=IMMEDIATE_START \
27 --value=YES 26 --value=YES
28 gnunet-config -c /home/$user/.config/gnunet.conf \ 27 gnunet-config -c /home/$user/.config/gnunet.conf \
29 --rewrite \
30 --section=gns-proxy \ 28 --section=gns-proxy \
31 --option=OPTIONS \ 29 --option=OPTIONS \
32 --value="-p $port" 30 --value="-p $port"
@@ -79,7 +77,6 @@ stop() {
79 77
80 # Disable gns-proxy in config 78 # Disable gns-proxy in config
81 gnunet-config -c /home/$user/.config/gnunet.conf \ 79 gnunet-config -c /home/$user/.config/gnunet.conf \
82 --rewrite \
83 --section=gns-proxy \ 80 --section=gns-proxy \
84 --option=IMMEDIATE_START \ 81 --option=IMMEDIATE_START \
85 --value=NO 82 --value=NO