diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-08-19 20:16:01 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-08-19 20:16:01 +0000 |
commit | de63af83abff9b31c782aa8715ab7a63c89bbeed (patch) | |
tree | 1e5f1f7c99b6d7adb9412fe5ad19a5bdc5328e05 | |
parent | a938a7763904768f63afbca8fe3190f55db64a3c (diff) |
[ar71xx] preliminary failsafe support (closes #5726)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17321 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | target/linux/ar71xx/base-files/etc/preinit.arch | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/target/linux/ar71xx/base-files/etc/preinit.arch b/target/linux/ar71xx/base-files/etc/preinit.arch index 2acbe2fb5..a6af7e117 100644 --- a/target/linux/ar71xx/base-files/etc/preinit.arch +++ b/target/linux/ar71xx/base-files/etc/preinit.arch @@ -20,11 +20,33 @@ fetch_mac_from_mtd() { [ ! -z $mac ] && ifconfig eth1 hw ether $mac 2>/dev/null } -case $(ar71xx_board_name) in - tew-632brp) - fetch_mac_from_mtd config lan_mac wan_mac - ;; - wrt160nl) - fetch_mac_from_mtd nvram lan_hwaddr wan_hwaddr - ;; -esac +preinit_load_modules() { + insmod input-core + insmod input-polldev + insmod gpio_buttons + insmod button-hotplug +} + +preinit_set_mac_address() { + case $(ar71xx_board_name) in + tew-632brp) + fetch_mac_from_mtd config lan_mac wan_mac + ;; + wrt160nl) + fetch_mac_from_mtd nvram lan_hwaddr wan_hwaddr + ;; + esac +} + +preinit_set_mac_address +preinit_load_modules + +ifname=eth0 + +failsafe_ip + +netmsg 192.168.1.255 "Press reset now, to enter Failsafe!" + +ifconfig "$ifname" 0.0.0.0 down + +sleep 2 |