updates from whiterussian
[openwrt.git] / openwrt / package / base-files / default / etc / preinit
1 #!/bin/sh
2 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
3 mount none /proc -t proc
4 insmod diag
5 echo 0x01 > /proc/sys/diag
6 sleep 1
7 if [ $(cat /proc/sys/reset) = 1 -o "$(nvram get failsafe)" = 1 ]; then
8 export FAILSAFE=true
9 [ "$(nvram get boot_wait)" != "on" ] && {
10 nvram set boot_wait=on
11 nvram commit
12 }
13 while :; do { echo $(((X=(X+1)%8)%2)) > /proc/sys/diag; sleep $((X==0)); } done &
14 fi
15
16 mount_root ${FAILSAFE:+failsafe}
17
18 exec /sbin/init
This page took 0.045374 seconds and 5 git commands to generate.