source: freewrt/package/base-files/default/sbin/mount_root@ aab9e07

freewrt_1_0 freewrt_2_0
Last change on this file since aab9e07 was aab9e07, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

simplify. fix squashfs images, we only support overlay filesystem at the moment, I will add ramfs as another firmware type later

git-svn-id: svn://www.freewrt.org/trunk/freewrt@375 afb5a338-a214-0410-bd46-81f09a774fd1

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