port-management: set uplink for wan port by default

This commit is contained in:
Sukru Senli 2018-02-07 12:02:54 +01:00
parent ae406ee1eb
commit 3475bc4aba

View file

@ -26,9 +26,10 @@ check_for_config(){
uci set ports.@ethport[-1].name="$(interfacename $port)"
uci set ports.@ethport[-1].ifname=$port
uci set ports.@ethport[-1].speed='auto'
if [ "$(interfacename $port)" = "WAN" ]
if [ "$(db -q get hw.board.ethernetWanPort)" = "$port" ]
then
uci set ports.@ethport[-1].pause=1
uci set ports.@ethport[-1].uplink=1
else
uci set ports.@ethport[-1].pause=0
fi