4 mount |
grep squashfs
>&- ||
{
5 echo "You do not have a squashfs partition; aborting"
6 echo "(firstboot cannot be run on jffs2 based firmwares)"
10 [ -f "/tmp/.firstboot" ] && {
11 echo "firstboot is already running"
16 jdev
=$
(mount |
awk '/jffs2/ {print $3}')
18 if [ -z "$jdev" ]; then
19 echo -n "Creating jffs2 partition... "
21 mount
-t jffs2
/dev
/mtdblock
/4 /jffs
25 echo "firstboot has already been run"
26 echo "jffs2 partition is mounted, only resetting files"
32 mount
/dev
/mtdblock
/2 /rom
-o ro
34 echo -n "creating directories... "
42 echo -n "setting up symlinks... "
43 for file in $
(cd /rom
; find * -type f
; find * -type l
;)
45 [ "${file%/*}" = "usr/lib/ipkg/info" -o "${file%/*}" = "etc/config" ] && {
46 cp -f /rom
/$file $file
48 ln -sf /rom
/$file $file
53 touch /tmp
/resolv.conf
54 ln -s /tmp
/resolv.conf
/etc
/resolv.conf
57 mount none
/jffs
/proc
-t proc
58 pivot_root
/jffs
/jffs
/rom
59 mount none
/dev
-t devfs
60 mount none
/tmp
-t ramfs
This page took 0.04812 seconds and 5 git commands to generate.