From: Chester A. Unal Date: Sun, 21 Jun 2026 08:44:20 +0000 (+0100) Subject: bsbf-bonding: fix final wan interface check and delete wan quietly X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=8262543989592b205210176eb91c4dcd935f336f;p=openwrt-packages.git bsbf-bonding: fix final wan interface check and delete wan quietly The exit command was running unconditionally which broke the system configuration. Fix that and simplify the wan interface check. Run network.wan deletion quietly in case it doesn't exist. Signed-off-by: Chester A. Unal --- diff --git a/net/bsbf-resources/Makefile b/net/bsbf-resources/Makefile index 51703efb5..dc6acbb40 100644 --- a/net/bsbf-resources/Makefile +++ b/net/bsbf-resources/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bsbf-resources -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=AGPL-3.0-or-later PKG_MAINTAINER:=Chester A. Unal diff --git a/net/bsbf-resources/files/etc/uci-defaults/99-bsbf-bonding b/net/bsbf-resources/files/etc/uci-defaults/99-bsbf-bonding index 5972e2838..851535764 100644 --- a/net/bsbf-resources/files/etc/uci-defaults/99-bsbf-bonding +++ b/net/bsbf-resources/files/etc/uci-defaults/99-bsbf-bonding @@ -45,10 +45,10 @@ fi final_wan_interfaces="$wan_network_interface $(echo $lan_interfaces | tr ' ' '\n' | grep -v "^$lan_network_interface$")" # Exit if there are no suitable wan interfaces. -[ -z "$(echo "$final_wan_interfaces" | tr ' ' '\n')" ] && uci revert network ; exit 0 +[ -z "$(echo $final_wan_interfaces)" ] && { uci revert network ; exit 0; } # Delete existing wan and wan6 networks. -uci delete network.wan +uci -q delete network.wan uci -q delete network.wan6 uci -q del_list firewall.$fw_section.network='wan' uci -q del_list firewall.$fw_section.network='wan6'