From 27fd5ac67391f0627aa0a97bda66e619d375d709 Mon Sep 17 00:00:00 2001 From: gitea-action Date: Mon, 30 Sep 2024 21:30:16 +0800 Subject: [PATCH] mihomo: sync upstream last commit: https://github.com/morytyann/OpenWrt-mihomo/commit/215df6da96d7881df60ca25b1d778a47bb8b3828 --- mihomo/Makefile | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/mihomo/Makefile b/mihomo/Makefile index 9284ee5cb..521e1c201 100644 --- a/mihomo/Makefile +++ b/mihomo/Makefile @@ -87,22 +87,26 @@ endef define Package/mihomo/postinst #!/bin/sh -uci -q batch <<-EOF > /dev/null - del firewall.mihomo - set firewall.mihomo=include - set firewall.mihomo.type=script - set firewall.mihomo.path=/etc/mihomo/scripts/tun.sh - set firewall.mihomo.fw4_compatible=1 - commit firewall -EOF +if [ -z $${IPKG_INSTROOT} ]; then + uci -q batch <<-EOF > /dev/null + del firewall.mihomo + set firewall.mihomo=include + set firewall.mihomo.type=script + set firewall.mihomo.path=/etc/mihomo/scripts/tun.sh + set firewall.mihomo.fw4_compatible=1 + commit firewall + EOF +fi endef define Package/mihomo/postrm #!/bin/sh -uci -q batch <<-EOF > /dev/null - del firewall.mihomo - commit firewall -EOF +if [ -z $${IPKG_INSTROOT} ]; then + uci -q batch <<-EOF > /dev/null + del firewall.mihomo + commit firewall + EOF +fi endef define Build/Prepare