luci-app-sqm: upgrade uci-defaults for ucitrack handling to use json
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 11 Apr 2024 09:16:32 +0000 (11:16 +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-sqm/root/etc/uci-defaults/50-luci-sqm [deleted file]
applications/luci-app-sqm/root/usr/share/ucitrack/luci-app-sqm.json [new file with mode: 0644]

diff --git a/applications/luci-app-sqm/root/etc/uci-defaults/50-luci-sqm b/applications/luci-app-sqm/root/etc/uci-defaults/50-luci-sqm
deleted file mode 100755 (executable)
index b3aa47c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-uci -q batch <<-EOF >/dev/null
-       delete ucitrack.@sqm[-1]
-       add ucitrack sqm
-       set ucitrack.@sqm[-1].init=sqm
-       del_list ucitrack.@firewall[0].affects=sqm
-       add_list ucitrack.@firewall[0].affects=sqm
-       commit ucitrack
-EOF
-
-exit 0
diff --git a/applications/luci-app-sqm/root/usr/share/ucitrack/luci-app-sqm.json b/applications/luci-app-sqm/root/usr/share/ucitrack/luci-app-sqm.json
new file mode 100644 (file)
index 0000000..ea72acf
--- /dev/null
@@ -0,0 +1,7 @@
+{
+       "config": "sqm",
+       "init": "sqm",
+       "affects": [
+               "sqm"
+       ]
+}