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