bsbf-bonding: fix final wan interface check and delete wan quietly
authorChester A. Unal <redacted>
Sun, 21 Jun 2026 08:44:20 +0000 (09:44 +0100)
committerChester A. Unal <redacted>
Sun, 21 Jun 2026 08:51:47 +0000 (09:51 +0100)
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 <redacted>
net/bsbf-resources/Makefile
net/bsbf-resources/files/etc/uci-defaults/99-bsbf-bonding

index 51703efb55047fb7d81096348506bf78da893cc1..dc6acbb40041c407079edb27a2512b338815fb59 100644 (file)
@@ -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 <chester.a.unal@arinc9.com>
index 5972e28385fba13dec2cabeb969ad6461604021b..851535764aef8f5da19d62df86436c76b0af021e 100644 (file)
@@ -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'
git clone https://git.99rst.org/PROJECT