5 [ -f "/tmp/.firstboot" ] && {
6 echo "firstboot is already running"
11 jdev=$(mount | awk '/jffs2/ {print $3}')
13 if [ -z "$jdev" ]; then
14 echo -n "Creating jffs2 partition... "
16 mount -t jffs2 /dev/mtdblock/4 /jffs
20 echo "firstboot has already been run"
21 echo "jffs2 partition is mounted, only resetting files"
27 mount /dev/mtdblock/2 /rom -o ro
29 echo -n "creating directories... "
37 echo -n "setting up symlinks... "
38 for file in $(cd /rom; find * -type f; find * -type l;)
40 [ "${file%/*}" = "usr/lib/ipkg/info" ] && {
41 cp -f /rom/$file $file
43 ln -sf /rom/$file $file
48 touch /tmp/resolv.conf
49 ln -s /tmp/resolv.conf /etc/resolv.conf
52 mount none /jffs/proc -t proc
53 pivot_root /jffs /jffs/rom
54 mount none /dev -t devfs
55 mount none /tmp -t ramfs