luci-app-nut: Remove old no-op uci-defaults script
authorHannu Nyman <hannu.nyman@iki.fi>
Sun, 7 Apr 2024 12:16:24 +0000 (15:16 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Sun, 7 Apr 2024 12:22:45 +0000 (15:22 +0300)
Remove old uci-defaults script that was supposed to be run
if nut was older than 2.4.7-8. Nut has been at 2.7.4-9 or newer
since 2018.

(Ps. The script had faulty logic: the version check never matched.)

Fixes #6966

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 983047a505d57d72b52e7a291f9a36b4e8c41794)

applications/luci-app-nut/root/etc/uci-defaults/40_luci-nut [deleted file]

diff --git a/applications/luci-app-nut/root/etc/uci-defaults/40_luci-nut b/applications/luci-app-nut/root/etc/uci-defaults/40_luci-nut
deleted file mode 100755 (executable)
index 45a1fbb..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-version="$(opkg status nut|grep 'Version: '|cut -f2 -d\ )"
-release="$(echo $version|cut -f2 -d-)"
-
-if [ "$version" = "2.7.4" ] && [ "$release" -lt 8 ]; then
-       uci -q batch <<-EOF >/dev/null
-               delete ucitrack.@nut_server[-1]
-               delete ucitrack.@nut_monitor[-1]
-               delete ucitrack.@nut_cgi[-1]
-               add ucitrack nut_server
-               set ucitrack.@nut_server[-1].init=nut-server
-               add ucitrack nut_monitor
-               set ucitrack.@nut_monitor[-1].init=nut-monitor
-               add ucitrack nut_cgi
-               set ucitrack.@nut_cgi[-1].init=nut-cgi
-               commit ucitrack
-EOF
-fi
-
-exit 0