From d4e9f920ea5eb2916f4d879a760d81df56ae3ac3 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 11 Apr 2024 16:37:28 +0200 Subject: [PATCH] luci-app-olsrd2: 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 --- luci-app-olsrd2/Makefile | 6 +++--- .../root/etc/uci-defaults/41_luci-olsrd2 | 13 ------------- .../root/usr/share/ucitrack/luci-app-olsrd2.json | 4 ++++ 3 files changed, 7 insertions(+), 16 deletions(-) delete mode 100755 luci-app-olsrd2/root/etc/uci-defaults/41_luci-olsrd2 create mode 100644 luci-app-olsrd2/root/usr/share/ucitrack/luci-app-olsrd2.json diff --git a/luci-app-olsrd2/Makefile b/luci-app-olsrd2/Makefile index f18d472..a14543e 100644 --- a/luci-app-olsrd2/Makefile +++ b/luci-app-olsrd2/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-olsrd2 PKG_VERSION:=0.2.6 -PKG_RELEASE:=15 +PKG_RELEASE:=16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk @@ -42,8 +42,8 @@ define Package/$(PKG_NAME)/install $(INSTALL_DATA) ./htdocs/luci-static/resources/view/olsrd2/* $(1)/www/luci-static/resources/view/olsrd2 $(INSTALL_DIR) $(1)/etc/config $(INSTALL_DATA) ./root/etc/config/* $(1)/etc/config - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(INSTALL_DATA) ./root/etc/uci-defaults/* $(1)/etc/uci-defaults + $(INSTALL_DIR) $(1)/usr/share/ucitrack + $(INSTALL_DATA) ./root/usr/share/ucitrack/luci-app-olsrd2.json $(1)/usr/share/ucitrack $(INSTALL_DIR) $(1)/usr/libexec/rpcd $(INSTALL_BIN) ./root/usr/libexec/rpcd/status.olsrd2 $(1)/usr/libexec/rpcd/status.olsrd2 $(INSTALL_DIR) $(1)/usr/share/luci/menu.d diff --git a/luci-app-olsrd2/root/etc/uci-defaults/41_luci-olsrd2 b/luci-app-olsrd2/root/etc/uci-defaults/41_luci-olsrd2 deleted file mode 100755 index 094970a..0000000 --- a/luci-app-olsrd2/root/etc/uci-defaults/41_luci-olsrd2 +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@olsrd2[-1] - add ucitrack olsrd2 - set ucitrack.@olsrd2[-1].init=olsrd2 - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -rm -f /tmp/luci-modulecache/* - -exit 0 diff --git a/luci-app-olsrd2/root/usr/share/ucitrack/luci-app-olsrd2.json b/luci-app-olsrd2/root/usr/share/ucitrack/luci-app-olsrd2.json new file mode 100644 index 0000000..05dbbd8 --- /dev/null +++ b/luci-app-olsrd2/root/usr/share/ucitrack/luci-app-olsrd2.json @@ -0,0 +1,4 @@ +{ + "config": "olsrd2", + "init": "olsrd2" +} -- 2.30.2