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