Changeset 278


Ignore:
Timestamp:
2005-02-21T06:03:21+01:00 (13 years ago)
Author:
mbm
Message:

deal with jffs2 transition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openwrt/target/default/target_skeleton/etc/preinit

    r225 r278  
    11#!/bin/sh 
    2 # executed from squashfs before init to  
    3 # transfer root to the jffs2 partition 
    42mount none /proc -t proc 
    53insmod diag 
     
    108  while :; do { echo $(((X=(X+1)%8)%2)) > /proc/sys/diag; sleep $((X==0)); } done & 
    119else 
    12   mtd unlock mtd4 
    13   mount -t jffs2 /dev/mtdblock/4 /jffs 
    14   pivot_root /jffs /jffs/rom 
    15   mount none /dev -t devfs 
    16   mount none /proc -t proc 
    17   umount rom/proc 
     10  mount | grep jffs2 1>&- || { 
     11    mtd unlock mtd4 
     12    mount -t jffs2 /dev/mtdblock/4 /jffs 
     13    pivot_root /jffs /jffs/rom 
     14    mount none /dev -t devfs 
     15    mount none /proc -t proc 
     16    umount rom/proc 
     17  } 
    1818fi 
    1919mount none /tmp -t ramfs 
Note: See TracChangeset for help on using the changeset viewer.