source: freewrt/package/base-files/default/sbin/failsafe@ 0a40224

freewrt_1_0 freewrt_2_0
Last change on this file since 0a40224 was 0a40224, checked in by Thorsten Glaser <tg@…>, 19 years ago

fix executable properties

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

  • Property mode set to 100755
File size: 768 bytes
Line 
1#!/bin/sh
2
3ifconfig $failsafe_if 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up
4netmsg 192.168.1.0 "(dummy message)"
5netmsg 192.168.1.255 "Press reset now, to enter Failsafe!"
6sleep 2
7
8if [ "$(cat /proc/sys/reset 2>&-)" = 1 -o "$(nvram get failsafe)" = 1 ]; then
9 while :; do { echo $(((X=(X+1)%8)%2)) > /proc/sys/diag; sleep $((X==0)); }
10done &
11 export FAILSAFE=true
12 netmsg 192.168.1.255 "Entering Failsafe!"
13 telnetd -l /bin/login <> /dev/null 2>&1
14else
15 ifconfig $failsafe_if 0.0.0.0
16 # revert to the boot loader's vlan config
17 # required for at least WRT54G v1.1
18 [ -d /proc/switch/eth0 ] && {
19 echo "$v0p" > /proc/switch/eth0/vlan/0/ports
20 echo "$v1p" > /proc/switch/eth0/vlan/1/ports
21 echo "$v2p" > /proc/switch/eth0/vlan/2/ports
22 }
23fi
24
Note: See TracBrowser for help on using the repository browser.