qosmngr: Fix regression in generating default classify rules

This commit is contained in:
Vivek Kumar Dutta 2025-03-24 18:23:58 +05:30 committed by Vivek Dutta
parent 2a47619b32
commit 9380411fa6
3 changed files with 17 additions and 20 deletions

View file

@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=qosmngr
PKG_VERSION:=1.0.22
PKG_VERSION:=1.0.23
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)

View file

@ -60,13 +60,11 @@ generate_lan_queues() {
generate_queue "$ifname" "$no_of_q"
}
if [ -s "/etc/config/qos" ]; then
if uci -q get qos.@queue[0] >/dev/null; then
# return if there is any valid content
exit
else
rm -f /etc/config/qos
fi
if uci -q get qos.@queue[0] >/dev/null; then
# return if there is any valid content
exit
else
rm -f /etc/config/qos
fi
touch /etc/config/qos

View file

@ -106,17 +106,16 @@ generate_classify(){
done
}
if [ -s "/etc/config/qos" ]; then
# cleaning up for upgrade same version that contain firewall.qos
if [ -s "/etc/firewall.qos" ]; then
rm -f "/etc/firewall.qos"
if [ -s "/etc/config/firewall" ]; then
uci delete firewall.qos
fi
generate_classify
elif uci -q get qos.@classify[0] >/dev/null; then
exit
else
generate_classify
# cleaning up for upgrade same version that contain firewall.qos
if [ -f "/etc/firewall.qos" ]; then
rm -f "/etc/firewall.qos"
if uci -q get firewall.qos >/dev/null; then
uci delete firewall.qos
fi
fi
if uci -q get qos.@classify[0] >/dev/null; then
exit
else
generate_classify
fi