From: Florian Eckert Date: Thu, 11 Apr 2024 14:30:13 +0000 (+0200) Subject: cjdns: upgrade uci-defaults for ucitrack handling to use json X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1c3f6b15994e46bc98b5ed302a06cb9ad913fa52;p=feed%2Frouting.git 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 --- diff --git a/cjdns/Makefile b/cjdns/Makefile index c602610..cd3ccfe 100644 --- a/cjdns/Makefile +++ b/cjdns/Makefile @@ -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 diff --git a/cjdns/files/cjdns.defaults b/cjdns/files/cjdns.defaults index b1745f1..04e9ceb 100644 --- a/cjdns/files/cjdns.defaults +++ b/cjdns/files/cjdns.defaults @@ -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 diff --git a/cjdns/files/luci-app-cjdns.json b/cjdns/files/luci-app-cjdns.json new file mode 100644 index 0000000..386b0fa --- /dev/null +++ b/cjdns/files/luci-app-cjdns.json @@ -0,0 +1,4 @@ +{ + "config": "cjdns", + "init": "cjdns" +}