X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/f8338897616e0fe6e7213778fd1ef3d064afb77e..70916d05defae02ed83ba6af2d1e2ba03e062525:/target/linux/brcm-2.4/base-files/etc/preinit.arch diff --git a/target/linux/brcm-2.4/base-files/etc/preinit.arch b/target/linux/brcm-2.4/base-files/etc/preinit.arch index 1b3c924ce..a90d314e2 100755 --- a/target/linux/brcm-2.4/base-files/etc/preinit.arch +++ b/target/linux/brcm-2.4/base-files/etc/preinit.arch @@ -15,7 +15,7 @@ failsafe() { } netmsg 192.168.1.255 "Entering Failsafe!" - telnetd -l /bin/login <> /dev/null 2>&1 + telnetd -l /bin/login.sh <> /dev/null 2>&1 ash --login } @@ -37,8 +37,6 @@ case "$(cat /proc/diag/model)" in "Sitecom WL-105b") ifname=eth1;; esac -failsafe_ip - check_module () { module="$1"; shift; params="$*" @@ -48,11 +46,14 @@ check_module () { return $? } +check_module tg3 insmod switch-core check_module switch-robo || check_module switch-adm || { check_module bcm57xx activate_gpio=0x4 && cpu_port="8u*" } || rmmod switch-core +failsafe_ip + [ -d /proc/switch/eth0 ] && { echo 1 > /proc/switch/eth0/reset