gnunet: work-around config sections naming
authorDaniel Golle <daniel@makrotopia.org>
Fri, 4 Dec 2015 17:56:08 +0000 (18:56 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 4 Dec 2015 18:00:35 +0000 (19:00 +0100)
gnunet's config section may contain dashes '-' which isn't an
allowed character for sections in UCI.
Thus replace the first underscore with a dash which in gnunet-config
sections, as that happends to be work for all currently used sections.
e.g. this now allows accessing sections like transport-http_server via
an UCI sections called transport_http_server as well as namestore-flat
using an UCI section called namestore_flat.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
net/gnunet/Makefile
net/gnunet/files/gnunet.init

index 28b4810b0ed2def3e03211187dccd4b478ef9ca6..cfb1949c3288c6bb1dbfe8e48dfaa6ad258ed0c0 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=gnunet
 PKG_SOURCE_VERSION:=36713
 PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 # ToDo:
 #  - break-out {peer,name,data}store for each backend
index aa8742295f6be6e6cc5795f4b8bc864167eb7833..379d0d69e40e7401682ca70abf37e78c0023d265 100644 (file)
@@ -73,7 +73,7 @@ prepare_config() {
                # $1    "Type"
                # $2    "Name"
                local __TYPE="$1"
-               local __NAME="$2"
+               local __NAME="${2/_/-}"
                [ "${__TYPE}" = "gnunet-config" ] && _gnunet_section="${__NAME}"
                [ "${__TYPE}" = "gnunet-exit-service" ] && _gnunet_section="${__NAME}.gnunet."
        }