developer | 0858735 | 2022-08-29 18:59:45 +0800 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | #Setting brlan0 bridge |
| 4 | if [ ! -d /sys/class/net/brlan0 ] |
| 5 | then |
| 6 | brctl addbr brlan0 |
| 7 | ip link set brlan0 address `cat /sys/class/net/eth1/address` |
| 8 | ifconfig brlan0 10.0.0.1 netmask 255.255.255.0 up |
| 9 | fi |
| 10 | |
| 11 | #Work around for Ethernet connected clients |
| 12 | if [ ! -d /sys/class/net/lan0 ] |
| 13 | then |
| 14 | brctl addif brlan0 eth1 |
| 15 | else |
| 16 | brctl addif brlan0 lan0 |
| 17 | brctl addif brlan0 lan1 |
| 18 | brctl addif brlan0 lan2 |
| 19 | brctl addif brlan0 lan3 |
| 20 | brctl addif brlan0 lan4 |
developer | 975997b | 2022-10-24 16:43:53 +0800 | [diff] [blame] | 21 | brctl addif brlan0 lan5 |
developer | 0858735 | 2022-08-29 18:59:45 +0800 | [diff] [blame] | 22 | |
| 23 | ifconfig lan0 up |
| 24 | ifconfig lan1 up |
| 25 | ifconfig lan2 up |
| 26 | ifconfig lan3 up |
| 27 | ifconfig lan4 up |
developer | 975997b | 2022-10-24 16:43:53 +0800 | [diff] [blame] | 28 | ifconfig lan5 up |
developer | 0858735 | 2022-08-29 18:59:45 +0800 | [diff] [blame] | 29 | fi |
| 30 | ifconfig eth1 up |
| 31 | |
| 32 | |
| 33 | #workaround: creating /opt/secure folder for ssh service |
| 34 | if [ ! -d /opt/secure ]; then |
| 35 | mkdir /opt/secure |
| 36 | fi |