temporary hack: delay resetmon checking by 1 sec
[openwrt.git] / root / etc / preinit
1 #!/bin/sh
2 mount none /proc -t proc
3 mtd unlock mtd4
4 sleep 1
5 if /sbin/resetmon ; then
6   mount -t jffs2 /dev/mtdblock/4 /jffs
7   pivot_root /jffs /jffs/rom
8   mount none /dev -t devfs
9   mount none /proc -t proc
10   umount rom/proc
11   umount rom/dev
12 else
13   FAILSAFE=true
14   export FAILSAFE
15 fi
16 mount none /tmp -t ramfs
17 exec /sbin/init