mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
Revert "qos: Avoid stats to be reseted on qos reload"
This reverts commit 3eb4b07880.
This commit is contained in:
parent
339ff22025
commit
d9800428c0
1 changed files with 0 additions and 40 deletions
|
|
@ -13,35 +13,7 @@ PROG=/usr/sbin/qosmngr
|
|||
. /lib/functions.sh
|
||||
include /lib/qos
|
||||
|
||||
#function to handle a policer section
|
||||
qos_reload_handler() {
|
||||
qos_mechanism_handler() {
|
||||
config_get cfgtype "$1" TYPE
|
||||
echo $cfgtype
|
||||
|
||||
if [ "$cfgtype" == "shaper" ]; then
|
||||
reload_qos $cfgtype
|
||||
elif [ "$cfgtype" == "classify" ]; then
|
||||
reload_qos $cfgtype
|
||||
elif [ "$cfgtype" == "policer" ]; then
|
||||
reload_qos $cfgtype
|
||||
elif [ "$cfgtype" == "queue" ]; then
|
||||
restart
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
config_load "/tmp/qos_config_diff"
|
||||
config_foreach qos_mechanism_handler
|
||||
}
|
||||
|
||||
|
||||
start_service() {
|
||||
if [ ! -f "/tmp/qos_config" ]; then
|
||||
touch /tmp/qos_config
|
||||
cp /etc/config/qos /tmp/qos_config
|
||||
fi
|
||||
|
||||
if [ -f "/etc/config/qos" ]; then
|
||||
reload_qos
|
||||
procd_open_instance qosmngr
|
||||
|
|
@ -65,15 +37,3 @@ restart() {
|
|||
setup_qos
|
||||
start
|
||||
}
|
||||
|
||||
reload_service()
|
||||
{
|
||||
if [[ -f "/etc/config/qos" && -f "/tmp/qos_config" ]]; then
|
||||
awk 'NR==FNR{a[FNR]=$0;next}$0!=a[FNR]{print}' /tmp/qos_config /etc/config/qos > /tmp/qos_config_diff
|
||||
cp /etc/config/qos /tmp/qos_config
|
||||
if [[ ! -z "/tmp/qos_config_diff" ]]; then
|
||||
qos_reload_handler
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue