Changeset 727556d in freewrt for package/base-files/files
- Timestamp:
- Sep 30, 2006, 12:11:58 AM (19 years ago)
- Branches:
- freewrt_1_0, freewrt_2_0
- Children:
- d496977
- Parents:
- 41b6d57
- Location:
- package/base-files/files
- Files:
-
- 2 edited
-
etc/preinit (modified) (1 diff)
-
sbin/failsafe (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
package/base-files/files/etc/preinit
r41b6d57 r727556d 2 2 export PATH=/bin:/sbin:/usr/bin:/usr/sbin 3 3 mount none /proc -t proc 4 [ -f /etc/preinit.arch ] && . /etc/preinit.arch 5 failsafe || /bin/sh 4 6 cat /etc/.rnd >/dev/urandom 2>&1 5 failsafe_if=eth0 6 [ -f /etc/preinit.arch ] && . /etc/preinit.arch 7 export failsafe_if 8 failsafe 9 mount_root ${FAILSAFE:+failsafe} 10 unset failsafe_if 7 mount_root 11 8 fwcf setup 2>&1 | logger -t fwcf 12 9 exec /sbin/init -
package/base-files/files/sbin/failsafe
r41b6d57 r727556d 1 1 #!/bin/sh 2 2 3 ifconfig $failsafe_if192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up4 netmsg 192.168.1.0 "(dummy message)" 3 ifconfig eth0 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up 4 netmsg 192.168.1.0 "(dummy message)" # b44 eats the first packet 5 5 netmsg 192.168.1.255 "Press reset now, to enter Failsafe!" 6 echo "Press reset now to enter Failsafe for ${failsafe_if}!"6 echo "Press reset now to enter Failsafe!" 7 7 sleep 2 8 8 9 if [ "$(</proc/sys/reset 2>&-)"= 1 ]; then9 if [ $(cat /proc/sys/reset) = 1 ]; then 10 10 while :; do 11 11 echo $(((X=(X+1)%8)%2)) >/proc/sys/diag 12 12 sleep $((X==0)) 13 13 done & 14 export FAILSAFE=true15 14 netmsg 192.168.1.255 "Entering Failsafe!" 16 15 telnetd 17 else 18 ifconfig $failsafe_if 0.0.0.0 19 # revert to the boot loader's vlan config 20 # required for at least WRT54G v1.1 21 [ -d /proc/switch/eth0 ] && { 22 echo "$v0p" >/proc/switch/eth0/vlan/0/ports 23 echo "$v1p" >/proc/switch/eth0/vlan/1/ports 24 echo "$v2p" >/proc/switch/eth0/vlan/2/ports 25 } 16 exit 1 26 17 fi
Note:
See TracChangeset
for help on using the changeset viewer.
