Changeset 17


Ignore:
Timestamp:
2004-05-04T11:42:46+02:00 (14 years ago)
Author:
mbm
Message:

allow firstboot to be rerun

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/root/bin/firstboot

    r5 r17  
    11#!/bin/sh 
     2# $Id$ 
    23 
    34exec 2>/dev/null 
    45 
    56umount /jffs  
    6 mount | grep jffs2 && { 
     7if [ -z "$(mount | grep jffs2)" ]; then 
     8        mtd erase OpenWrt 
     9        mount -t jffs2 /dev/mtdblock/4 /jffs 
     10        mount /dev/mtdblock/2 /rom -o ro 
     11        cd /jffs 
     12else 
    713        echo "firstboot has already been run" 
    8         echo "to run firstboot again you must boot failsafe" 
    9         exit 
    10 } 
     14        echo "fixing symlinks instead" 
     15        cd / 
     16fi 
    1117 
    12 mtd erase OpenWrt 
    13 mount -t jffs2 /dev/mtdblock/4 /jffs 
    14 mount /dev/mtdblock/2 /rom -o ro 
    15 cd /jffs 
    1618{ 
    1719        cd /rom 
    1820        find . -type d 
     21        cd - 
    1922} | xargs mkdir 
    2023 
Note: See TracChangeset for help on using the changeset viewer.