mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
qosmngr: Update BDMF shell usage
This commit is contained in:
parent
7a877b0c45
commit
09211031ac
1 changed files with 1 additions and 10 deletions
|
|
@ -932,21 +932,12 @@ assign_policer_to_port() {
|
|||
local ifname="$1"
|
||||
local pindex="$2"
|
||||
local portorder="$(db -q get hw.board.ethernetPortOrder)"
|
||||
local wanport="$(db -q get hw.board.ethernetWanPort)"
|
||||
local runner_lan_ports="$(bdmf_shell -c `cat /var/bdmf_sh_id` -cmd /b/examine port | grep ': port/index=lan' | sed -e 's#\.##g' | cut -f2 -d' ' | sort -u | xargs)"
|
||||
local i=1
|
||||
|
||||
for port in $portorder; do
|
||||
if [ "$ifname" == "$port" ]; then
|
||||
if [ "$wanport" == "$port" ]; then
|
||||
bdmf_shell -c `cat /var/bdmf_sh_id` -cmd /b/configure port/index=wan0 ingress_rate_limit={traffic_types=8,policer={policer/dir=us,index=$pindex}}
|
||||
else
|
||||
local lanport="$(echo -n "$runner_lan_ports" | cut -f${i} -d' ')"
|
||||
bdmf_shell -c `cat /var/bdmf_sh_id` -cmd /b/configure $lanport ingress_rate_limit={traffic_types=8,policer={policer/dir=us,index=$pindex}}
|
||||
fi
|
||||
bdmf_shell -c `cat /var/bdmf_sh_id` -cmd /b/configure port/name=$port ingress_rate_limit={traffic_types=8,policer={policer/dir=us,index=$pindex}}
|
||||
break
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue