mirror of
https://git.openwrt.org/feed/routing.git
synced 2025-01-05 10:16:40 +08:00
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:
parent
0fed081486
commit
1c3f6b1599
@ -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
|
||||
|
@ -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
|
||||
|
4
cjdns/files/luci-app-cjdns.json
Normal file
4
cjdns/files/luci-app-cjdns.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"config": "cjdns",
|
||||
"init": "cjdns"
|
||||
}
|
Loading…
Reference in New Issue
Block a user