sqm-scripts: Fix return value bug in postrm script
authorTony Ambardar <itugrok@yahoo.com>
Mon, 8 Jan 2018 11:50:26 +0000 (03:50 -0800)
committerToke Høiland-Jørgensen <toke@toke.dk>
Sat, 3 Mar 2018 15:39:32 +0000 (16:39 +0100)
The script removes the UCI option ucitrack.@sqm[0] if present and then
returns success. If that UCI option is already absent however, the
script incorrectly returns failure, which blocks upgrade of the
luci-app-sqm package.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
net/sqm-scripts/Makefile

index 3aa81b18fefede22c748250fb6fa2ba7de5a7abf..4b28755f7f0b2c710a4034a6bd2271c6e0307c5d 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=sqm-scripts
 PKG_SOURCE_VERSION:=8217081f7e52af342c362b29480461575c496387
 PKG_VERSION:=1.1.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPLv2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.xz
@@ -80,7 +80,7 @@ uci -q get ucitrack.@sqm[0] > /dev/null && {
   uci delete ucitrack.@sqm[0]
   uci del_list ucitrack.@firewall[0].affects=sqm
   uci commit
-}
+} || exit 0
 endef
 
 $(eval $(call BuildPackage,sqm-scripts))