From 44756e87b21fe1e4750d4b219cfc91f3cb3f40af Mon Sep 17 00:00:00 2001 From: wukongdaily <2666180@gmail.com> Date: Thu, 9 Jul 2026 09:00:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(advanced=5Funinstall):=20=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E5=AE=89=E8=A3=85luci-lua-runtime=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在高级卸载功能中添加依赖检查,当未安装luci-lua-runtime时自动下载安装 --- lib/lib-common.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/lib-common.sh b/lib/lib-common.sh index 2ccd453..bd4afaf 100644 --- a/lib/lib-common.sh +++ b/lib/lib-common.sh @@ -342,6 +342,21 @@ do_install_ui_helper() { # ============================================================================ advanced_uninstall() { opkg update >/dev/null 2>&1 && opkg install bash || echo "bash 已存在" + + if ! opkg list-installed | grep -q "luci-lua-runtime"; then + echo "📥 正在下载 luci-lua-runtime 依赖..." + wget -O /tmp/luci-lua-runtime.ipk "https://repo.istoreos.com/repo/all/compat/luci-lua-runtime_0.00-r0_all.ipk" || { + echo "❌ 下载 luci-lua-runtime 失败" + return 1 + } + opkg install /tmp/luci-lua-runtime.ipk || { + echo "❌ 安装 luci-lua-runtime 失败" + return 1 + } + rm -f /tmp/luci-lua-runtime.ipk + echo "✅ luci-lua-runtime 安装成功" + fi + echo "📥 正在下载高级卸载插件..." wget -O /tmp/advanced_uninstall.run $HTTP_HOST/uninstall/luci-app-uninstall.run sh /tmp/advanced_uninstall.run