source: freewrt/target/linux/package/base-files/files/brcm-2.4/etc/preinit.arch@ 30d630b

freewrt_1_0 freewrt_2_0
Last change on this file since 30d630b was 30d630b, checked in by Thorsten Glaser <tg@…>, 19 years ago
  • remove empty directories (ok wbx@)
  • fix failsafe_if stuff
  • optimise scripts, fix indent, while here

git-svn-id: svn://www.freewrt.org/trunk/freewrt@268 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100755
File size: 820 bytes
Line 
1#!/bin/sh
2
3[ "$(nvram get boot_wait)" != "on" ] && {
4 nvram set boot_wait=on
5 nvram commit
6}
7
8insmod diag
9echo 0x01 >/proc/sys/diag
10
11# WAP54G, WL-HDD
12[ "$(nvram get boardnum)" = 2 \
13 -o \( "$(nvram get boardnum)" = asusX \
14 -a "$(nvram get et1phyaddr)" -eq 1 \) ] && failsafe_if=eth1
15
16insmod switch-core
17insmod switch-robo || insmod switch-adm || rmmod switch-core
18
19# save the boot loader's vlan config
20# we need it on some routers that have no vlan*ports set
21[ -d /proc/switch/eth0 ] && {
22 v0p="$(</proc/switch/eth0/vlan/0/ports)"
23 v1p="$(</proc/switch/eth0/vlan/1/ports)"
24 v2p="$(</proc/switch/eth0/vlan/2/ports)"
25 echo 1 >/proc/switch/eth0/reset
26
27 case "$(nvram get boardtype)" in
28 0x0467|0x042f) echo "0 1 2 3 5u*";;
29 *) echo "1 2 3 4 5u*";;
30 esac >/proc/switch/eth0/vlan/0/ports
31 export v0p v1p v2p
32}
Note: See TracBrowser for help on using the repository browser.