cjdns: upgrade uci-defaults for ucitrack handling to use json

Conversion of the 'uci-defaults' script for ucitrack handling to the new
json processing.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert 2024-04-11 16:30:13 +02:00 committed by Josef Schlehofer
parent 0fed081486
commit 1c3f6b1599
3 changed files with 11 additions and 10 deletions

View File

@ -18,7 +18,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=cjdns
PKG_VERSION:=21.1
PKG_RELEASE:=5
PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/cjdelisle/cjdns/tar.gz/$(PKG_NAME)-v$(PKG_VERSION)?
@ -99,7 +99,8 @@ define Package/cjdns/install
$(1)/etc/config \
$(1)/etc/init.d \
$(1)/etc/uci-defaults \
$(1)/usr/lib/lua/cjdns
$(1)/usr/lib/lua/cjdns \
$(1)/usr/share/ucitrack
$(INSTALL_BIN) \
./files/cjdrouteconf \
@ -121,6 +122,10 @@ define Package/cjdns/install
./files/cjdns.defaults \
$(1)/etc/uci-defaults/cjdns
$(INSTALL_DATA) \
./files/luci-app-cjdns.json \
$(1)/usr/share/ucitrack
$(CP) \
./lua/cjdns/* \
$(1)/usr/lib/lua/cjdns

View File

@ -4,14 +4,6 @@
uci get cjdns.cjdns.ipv6 >/dev/null 2>&1
if [ $? -ne 0 ]; then
# register commit handler
uci -q batch <<-EOF >/dev/null
delete ucitrack.@cjdns[-1]
add ucitrack cjdns
set ucitrack.@cjdns[-1].init=cjdns
commit ucitrack
EOF
# generate configuration
touch /etc/config/cjdns
cjdroute --genconf | cjdroute --cleanconf | cjdrouteconf set

View File

@ -0,0 +1,4 @@
{
"config": "cjdns",
"init": "cjdns"
}