projects
/
openwrt.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add mount_root script to mount root fs (called from /etc/preinit)
[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 ] ; then
7
export FAILSAFE=true
8
while :; do { echo $(((X=(X+1)%8)%2)) > /proc/sys/diag; sleep $((X==0)); } done &
9
fi
10
/sbin/mount_root ${FAILSAFE:+failsafe}
11
12
exec /sbin/init