gnunet: use gnunet-config's new differential write

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2016-05-19 19:13:53 +02:00
parent 9623e833e2
commit c34af20cf8
2 changed files with 12 additions and 12 deletions

View file

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=gnunet PKG_NAME:=gnunet
PKG_SOURCE_VERSION:=37179 PKG_SOURCE_VERSION:=37179
PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION) PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
PKG_RELEASE:=2 PKG_RELEASE:=3
# ToDo: # ToDo:
# - break-out {peer,name,data}store for each backend # - break-out {peer,name,data}store for each backend
@ -179,7 +179,7 @@ define Package/gnunet/install
$(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/gnunet.defaults $(1)/etc/uci-defaults/gnunet $(INSTALL_BIN) ./files/gnunet.defaults $(1)/etc/uci-defaults/gnunet
$(INSTALL_DIR) $(1)/lib/netifd/proto $(INSTALL_DIR) $(1)/lib/netifd/proto
$(INSTALL_BIN) ./files/gnunet-proto.sh $(1)/lib/netifd/proto $(INSTALL_BIN) ./files/gnunet-proto.sh $(1)/lib/netifd/proto/gnunet.sh
endef endef
define Package/gnunet/conffiles define Package/gnunet/conffiles

View file

@ -43,7 +43,7 @@ prepare_config() {
touch $CONFIGFILE touch $CONFIGFILE
chown gnunet:gnunet $CONFIGFILE chown gnunet:gnunet $CONFIGFILE
chmod 0640 $CONFIGFILE chmod 0640 $CONFIGFILE
gnunet-config -c $CONFIGFILE -s PATHS -o GNUNET_HOME -V $GNUNET_HOME gnunet-config -c $CONFIGFILE -w -s PATHS -o GNUNET_HOME -V $GNUNET_HOME
# minimal persistency in /etc/gnunet # minimal persistency in /etc/gnunet
[ ! -d /etc/gnunet ] && { [ ! -d /etc/gnunet ] && {
@ -52,11 +52,11 @@ prepare_config() {
} }
# defaults paths for persistent files # defaults paths for persistent files
gnunet-config -c $CONFIGFILE -s PATHS -o GNUNET_CONFIG_HOME -V /etc/gnunet gnunet-config -c $CONFIGFILE -w -s PATHS -o GNUNET_CONFIG_HOME -V /etc/gnunet
gnunet-config -c $CONFIGFILE -s PEER -o PRIVATE_KEY -V /etc/gnunet/private_key.ecc gnunet-config -c $CONFIGFILE -w -s PEER -o PRIVATE_KEY -V /etc/gnunet/private_key.ecc
gnunet-config -c $CONFIGFILE -s identity -o EGODIR -V /etc/gnunet/identity/egos gnunet-config -c $CONFIGFILE -w -s identity -o EGODIR -V /etc/gnunet/identity/egos
gnunet-config -c $CONFIGFILE -s revocation -o DATABASE -V /etc/gnunet/revocation.dat gnunet-config -c $CONFIGFILE -w -s revocation -o DATABASE -V /etc/gnunet/revocation.dat
gnunet-config -c $CONFIGFILE -s nse -o PROOFFILE -V /etc/gnunet/proof.dat gnunet-config -c $CONFIGFILE -w -s nse -o PROOFFILE -V /etc/gnunet/proof.dat
# enable all installed transport plugins # enable all installed transport plugins
transport_plugins=$(gnunet-config -c $CONFIGFILE -s transport -o PLUGINS) transport_plugins=$(gnunet-config -c $CONFIGFILE -s transport -o PLUGINS)
@ -66,11 +66,11 @@ prepare_config() {
[ -n "$( echo $transport_plugins | grep $transplug )" ] || [ -n "$( echo $transport_plugins | grep $transplug )" ] ||
transport_plugins="$transport_plugins $transplug" transport_plugins="$transport_plugins $transplug"
done done
gnunet-config -c $CONFIGFILE -s transport -o PLUGINS -V "$transport_plugins" gnunet-config -c $CONFIGFILE -w -s transport -o PLUGINS -V "$transport_plugins"
# do not touch sysctl, iptables and routing # do not touch sysctl, iptables and routing
gnunet-config -c $CONFIGFILE -s dns -o SKIP_ROUTING_SETUP -V YES gnunet-config -c $CONFIGFILE -w -s dns -o SKIP_ROUTING_SETUP -V YES
gnunet-config -c $CONFIGFILE -s exit -o EXIT_IFNAME -V '' gnunet-config -c $CONFIGFILE -w -s exit -o EXIT_IFNAME -V ''
# apply config from UCI # apply config from UCI
_gnunet_section="" _gnunet_section=""
@ -88,7 +88,7 @@ prepare_config() {
# $2 value # $2 value
local __OPT="$1" local __OPT="$1"
local __VAL="$2" local __VAL="$2"
gnunet-config -c $CONFIGFILE -s ${_gnunet_section} -o ${__OPT} -V "${__VAL}" gnunet-config -c $CONFIGFILE -w -s ${_gnunet_section} -o ${__OPT} -V "${__VAL}"
} }
config_load gnunet config_load gnunet