2005-02-06 00:52:16 +00:00
|
|
|
#!/bin/sh
|
2005-09-10 18:28:33 +00:00
|
|
|
. /etc/nvram.sh
|
2005-07-20 19:58:40 +00:00
|
|
|
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
2005-02-06 00:52:16 +00:00
|
|
|
mount none /proc -t proc
|
|
|
|
insmod diag
|
|
|
|
echo 0x01 > /proc/sys/diag
|
|
|
|
sleep 1
|
2005-09-29 12:02:01 +00:00
|
|
|
if [ ! -f /proc/sys/reset ] || [ $(cat /proc/sys/reset) = 1 -o "$(nvram get failsafe)" = 1 ]; then
|
2005-07-15 16:49:11 +00:00
|
|
|
export FAILSAFE=true
|
2005-07-20 19:58:40 +00:00
|
|
|
[ "$(nvram get boot_wait)" != "on" ] && {
|
|
|
|
nvram set boot_wait=on
|
|
|
|
nvram commit
|
2005-07-15 16:49:11 +00:00
|
|
|
}
|
|
|
|
while :; do { echo $(((X=(X+1)%8)%2)) > /proc/sys/diag; sleep $((X==0)); } done &
|
2005-02-06 00:52:16 +00:00
|
|
|
fi
|
2005-07-15 16:49:11 +00:00
|
|
|
|
2005-07-20 19:58:40 +00:00
|
|
|
mount_root ${FAILSAFE:+failsafe}
|
2005-03-23 13:31:22 +00:00
|
|
|
|
2005-02-06 00:52:16 +00:00
|
|
|
exec /sbin/init
|