9bda9cc75ed91fac63ff6915f6e841383c46dcb6
[openwrt/svn-archive/archive.git] / target / linux / atheros / base-files / etc / preinit.arch
1 # reset button only supported on ar5315+ at the moment
2 grep 'Atheros AR231[567]' /proc/cpuinfo > /dev/null && {
3 if [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \
4 -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; then
5 vconfig set_name_type DEV_PLUS_VID_NO_PAD
6 ifconfig eth0 up
7 vconfig add eth0 1
8 ifname=eth0.1
9 else
10 ifname=eth0
11 fi
12 failsafe_ip
13 netmsg 192.168.1.255 "Press reset now, to enter Failsafe!"
14 ifconfig "$ifname" 0.0.0.0 down
15 sleep 2
16 if [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \
17 -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; then
18 vconfig rem eth0.1
19 ifconfig eth0 down
20 fi
21 }