luci-app-olsr: upgrade uci-defaults for ucitrack handling to use json
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 11 Apr 2024 09:31:36 +0000 (11:31 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 11 Apr 2024 14:15:52 +0000 (16:15 +0200)
Conversion of the 'uci-defaults' script for ucitrack handling to the new
json processing.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-olsr/root/etc/uci-defaults/40_luci-olsr [deleted file]
applications/luci-app-olsr/root/usr/share/ucitrack/luci-app-olsr.json [new file with mode: 0644]
applications/luci-app-olsr/root/usr/share/ucitrack/luci-app-olsr6.json [new file with mode: 0644]

diff --git a/applications/luci-app-olsr/root/etc/uci-defaults/40_luci-olsr b/applications/luci-app-olsr/root/etc/uci-defaults/40_luci-olsr
deleted file mode 100755 (executable)
index a941abd..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-uci -q batch <<-EOF >/dev/null
-       delete ucitrack.@olsrd[-1]
-       add ucitrack olsrd
-       set ucitrack.@olsrd[-1].init=olsrd
-       delete ucitrack.@olsrd6[-1]
-       add ucitrack olsrd6
-       set ucitrack.@olsrd6[-1].init=olsrd6
-       commit ucitrack
-EOF
-
-exit 0
diff --git a/applications/luci-app-olsr/root/usr/share/ucitrack/luci-app-olsr.json b/applications/luci-app-olsr/root/usr/share/ucitrack/luci-app-olsr.json
new file mode 100644 (file)
index 0000000..e98139f
--- /dev/null
@@ -0,0 +1,4 @@
+{
+       "config": "olsrd",
+       "init": "olsrd"
+}
diff --git a/applications/luci-app-olsr/root/usr/share/ucitrack/luci-app-olsr6.json b/applications/luci-app-olsr/root/usr/share/ucitrack/luci-app-olsr6.json
new file mode 100644 (file)
index 0000000..5b49601
--- /dev/null
@@ -0,0 +1,4 @@
+{
+       "config": "olsrd6",
+       "init": "olsrd6"
+}