diff --git a/luci-app-passwall/root/usr/share/passwall/app.sh b/luci-app-passwall/root/usr/share/passwall/app.sh index ce5c6494e..f97b95a99 100755 --- a/luci-app-passwall/root/usr/share/passwall/app.sh +++ b/luci-app-passwall/root/usr/share/passwall/app.sh @@ -208,13 +208,16 @@ check_port_exists() { check_depends() { local depends local tables=${1} + local file_path="/usr/lib/opkg/info" + local file_ext=".control" + [ -d "/lib/apk/packages" ] && file_path="/lib/apk/packages" && file_ext=".list" if [ "$tables" == "iptables" ]; then for depends in "iptables-mod-tproxy" "iptables-mod-socket" "iptables-mod-iprange" "iptables-mod-conntrack-extra" "kmod-ipt-nat"; do - [ -s "/usr/lib/opkg/info/${depends}.control" ] || echolog "$tables透明代理基础依赖 $depends 未安装..." + [ -s "${file_path}/${depends}${file_ext}" ] || echolog "$tables透明代理基础依赖 $depends 未安装..." done else for depends in "kmod-nft-socket" "kmod-nft-tproxy" "kmod-nft-nat"; do - [ -s "/usr/lib/opkg/info/${depends}.control" ] || echolog "$tables透明代理基础依赖 $depends 未安装..." + [ -s "${file_path}/${depends}${file_ext}" ] || echolog "$tables透明代理基础依赖 $depends 未安装..." done fi }