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