Browse Source

gnunet: work-around config sections naming

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>
Daniel Golle 9 years ago
parent
commit
22c907b0e1
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      net/gnunet/Makefile
  2. 1
    1
      net/gnunet/files/gnunet.init

+ 1
- 1
net/gnunet/Makefile View File

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
10 10
 PKG_NAME:=gnunet
11 11
 PKG_SOURCE_VERSION:=36713
12 12
 PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
13
-PKG_RELEASE:=2
13
+PKG_RELEASE:=3
14 14
 
15 15
 # ToDo:
16 16
 #  - break-out {peer,name,data}store for each backend

+ 1
- 1
net/gnunet/files/gnunet.init View File

@@ -73,7 +73,7 @@ prepare_config() {
73 73
 		# $1    "Type"
74 74
 		# $2    "Name"
75 75
 		local __TYPE="$1"
76
-		local __NAME="$2"
76
+		local __NAME="${2/_/-}"
77 77
 		[ "${__TYPE}" = "gnunet-config" ] && _gnunet_section="${__NAME}"
78 78
 		[ "${__TYPE}" = "gnunet-exit-service" ] && _gnunet_section="${__NAME}.gnunet."
79 79
 	}