Changeset 110


Ignore:
Timestamp:
2004-07-21T05:13:56+02:00 (14 years ago)
Author:
mbm
Message:

Hacks to run firstboot automatically

Location:
trunk/root
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/root/bin/firstboot

    r17 r110  
    44exec 2>/dev/null 
    55 
    6 umount /jffs  
    7 if [ -z "$(mount | grep jffs2)" ]; then 
     6[ -f "/tmp/.firstboot" ] && { 
     7        echo "firstboot is already running" 
     8        return 
     9} 
     10touch /tmp/.firstboot 
     11 
     12jdev=$(mount | awk '/jffs2/ {print $3}') 
     13 
     14if [ -z "$jdev" ]; then 
    815        mtd erase OpenWrt 
    916        mount -t jffs2 /dev/mtdblock/4 /jffs 
    10         mount /dev/mtdblock/2 /rom -o ro 
    1117        cd /jffs 
    1218else 
    1319        echo "firstboot has already been run" 
    1420        echo "fixing symlinks instead" 
    15         cd / 
     21        cd $jdev 
    1622fi 
     23 
     24mount /dev/mtdblock/2 /rom -o ro 
    1725 
    1826{ 
  • trunk/root/etc/init.d/S99done

    r18 r110  
    11#!/bin/sh 
     2[ -z "$FAILSAFE" ] && { 
     3        { mount | grep jffs2 1>-; } || firstboot 
     4} 
    25# turn off DMZ led 
    36echo "0x00" > /proc/sys/diag 
Note: See TracChangeset for help on using the changeset viewer.