blob: 012e4d9c56b403f17c444336efe03efd47ccded2 [file] [log] [blame]
developer42af00d2022-08-29 18:59:45 +08001#!/bin/sh
developer139ca352022-11-23 17:45:23 +08002lan_ip=`syscfg get lan_ipaddr`
3lan_mask=`syscfg get lan_netmask`
developer42af00d2022-08-29 18:59:45 +08004#Setting brlan0 bridge
5if [ ! -d /sys/class/net/brlan0 ]
6then
7 brctl addbr brlan0
8 ip link set brlan0 address `cat /sys/class/net/eth1/address`
developer139ca352022-11-23 17:45:23 +08009 ifconfig brlan0 $lan_ip netmask $lan_mask up
developer42af00d2022-08-29 18:59:45 +080010fi
11
12#Work around for Ethernet connected clients
13if [ ! -d /sys/class/net/lan0 ]
14then
15brctl addif brlan0 eth1
16else
17brctl addif brlan0 lan0
18brctl addif brlan0 lan1
19brctl addif brlan0 lan2
20brctl addif brlan0 lan3
21brctl addif brlan0 lan4
developer158c9ee2022-10-24 16:43:53 +080022brctl addif brlan0 lan5
developer42af00d2022-08-29 18:59:45 +080023
24ifconfig lan0 up
25ifconfig lan1 up
26ifconfig lan2 up
27ifconfig lan3 up
28ifconfig lan4 up
developer158c9ee2022-10-24 16:43:53 +080029ifconfig lan5 up
developer42af00d2022-08-29 18:59:45 +080030fi
31ifconfig eth1 up
32
developer139ca352022-11-23 17:45:23 +080033board_name=`cat /proc/device-tree/model`
developer42af00d2022-08-29 18:59:45 +080034
developer139ca352022-11-23 17:45:23 +080035if [[ $board_name == *"7988"* ]]; then
36 brctl addif brlan0 eth3
37 ifconfig eth3 up
38fi
developer42af00d2022-08-29 18:59:45 +080039#workaround: creating /opt/secure folder for ssh service
40if [ ! -d /opt/secure ]; then
developer139ca352022-11-23 17:45:23 +080041 mkdir -p /opt/secure
developer42af00d2022-08-29 18:59:45 +080042fi