fix(advanced_uninstall): 补充安装luci-lua-runtime依赖
在高级卸载功能中添加依赖检查,当未安装luci-lua-runtime时自动下载安装
This commit is contained in:
@@ -342,6 +342,21 @@ do_install_ui_helper() {
|
|||||||
# ============================================================================
|
# ============================================================================
|
||||||
advanced_uninstall() {
|
advanced_uninstall() {
|
||||||
opkg update >/dev/null 2>&1 && opkg install bash || echo "bash 已存在"
|
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 "📥 正在下载高级卸载插件..."
|
echo "📥 正在下载高级卸载插件..."
|
||||||
wget -O /tmp/advanced_uninstall.run $HTTP_HOST/uninstall/luci-app-uninstall.run
|
wget -O /tmp/advanced_uninstall.run $HTTP_HOST/uninstall/luci-app-uninstall.run
|
||||||
sh /tmp/advanced_uninstall.run
|
sh /tmp/advanced_uninstall.run
|
||||||
|
|||||||
Reference in New Issue
Block a user