freewrt_1_0
freewrt_2_0
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 | size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo)
|
|---|
| 3 | mount none /tmp -t tmpfs -o size=$size
|
|---|
| 4 |
|
|---|
| 5 | if [ "$1" != "failsafe" ]; then
|
|---|
| 6 | mtd unlock filesystem
|
|---|
| 7 | mount | grep jffs2 >&-
|
|---|
| 8 | if [ $? = 0 ] ; then
|
|---|
| 9 | if [ $(cat /proc/mtd | wc -l) = 6 ]; then
|
|---|
| 10 | mtd erase filesystem
|
|---|
| 11 | jffs2root --move
|
|---|
| 12 | else
|
|---|
| 13 | mount -o remount,rw /dev/root /
|
|---|
| 14 | fi
|
|---|
| 15 | else
|
|---|
| 16 | . /bin/firstboot
|
|---|
| 17 | fi
|
|---|
| 18 | fi
|
|---|
| 19 |
|
|---|
| 20 | mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777
|
|---|
| 21 | mkdir -p /dev/pts
|
|---|
| 22 | mount none /dev/pts -t devpts
|
|---|
| 23 | mount -t sysfs none /sys 2>&-
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.