Changeset 36429


Ignore:
Timestamp:
2013-04-25T21:02:32+02:00 (5 years ago)
Author:
blogic
Message:

mount_root: prepare base-files

Signed-off-by: John Crispin <blogic@…>

Location:
trunk/package/base-files
Files:
1 added
1 deleted
6 edited
16 copied
10 moved

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/files.old/lib/firstboot/99_10_with_fo_cleanup

    r36003 r36429  
    77    # try to get rid of /tmp/root 
    88    # this will almost always fail 
    9     umount /tmp/root 2>&- 
     9    umount -l /tmp/root 2>&- 
    1010        grep -q overlay /proc/filesystems && { 
    1111                cd / 
  • trunk/package/base-files/files/etc/init.d/done

    r17571 r36429  
    66        [ -d /tmp/root ] && { 
    77                lock /tmp/.switch2jffs 
    8                 firstboot switch2jffs 
     8                switch2jffs 
    99                lock -u /tmp/.switch2jffs 
    1010        } 
  • trunk/package/base-files/files/etc/rc.button/reset

    r36003 r36429  
    1515then 
    1616        echo "FACTORY RESET" > /dev/console 
    17         firstboot && reboot & 
     17        jffs2reset -y && reboot & 
    1818fi 
  • trunk/package/base-files/files/lib/preinit/80_mount_root

    r36003 r36429  
    44 
    55do_mount_root() { 
    6     boot_run_hook preinit_mount_root 
     6        mount_root 
     7        boot_run_hook preinit_mount_root 
     8        [ -f /sysupgrade.tgz ] && { 
     9                echo "- config restore -" 
     10                cd / 
     11                mv sysupgrade.tgz /tmp 
     12                tar xzf /tmp/sysupgrade.tgz 
     13                rm -f /tmp/sysupgrade.tgz 
     14                sync 
     15        } 
    716} 
    817 
  • trunk/package/base-files/files/sbin/firstboot

    r36133 r36429  
    11#!/bin/sh 
    22 
    3 switch2jffs_hook= 
    4 jffs2reset_hook= 
    5 no_fo_hook= 
    6  
    7 . /lib/functions.sh 
    8  
    9 firstboot_skip_next=false 
    10  
    11 for fb_source_file in /lib/firstboot/*; do 
    12     . $fb_source_file 
    13 done 
    14  
    15 set_mtd_part 
    16 set_rom_part 
    17 set_jffs_part 
    18  
    19 # invoked as an executable 
    20 if [ "${0##*/}" = "firstboot" ]; then 
    21     if [ "$1" = "switch2jffs" ]; then 
    22         boot_run_hook switch2jffs 
    23     else 
    24         if [ -t 0 ] && [ "$1" != "-y" ]; then 
    25                 local input 
    26  
    27                 echo -n "firstboot will erase all settings and remove any installed packages. Are you sure? [N/y]" 
    28                 read input 
    29                 [ "$input" = "y" ] || [ "$input" = "Y" ] || return 0 
    30         fi 
    31  
    32         if [ -n "$jffs" ]; then 
    33             reset_has_fo=true 
    34             echo "firstboot has already been run" 
    35             echo "jffs2 partition is mounted, only resetting files" 
    36             boot_run_hook jffs2reset 
    37         else 
    38             mtd erase "$partname" 
    39             mount -o noatime "$mtdpart" /overlay -t jffs2 
    40             fopivot /overlay /rom 1 
    41         fi 
    42     fi 
    43 fi 
    44  
     3/sbin/jffs2reset 
  • trunk/package/base-files/files/sbin/sysupgrade

    r34975 r36429  
    180180run_hooks "" $sysupgrade_pre_upgrade 
    181181 
     182ubus call system upgrade 
     183 
    182184kill_remaining TERM 
    183185sleep 3 
Note: See TracChangeset for help on using the changeset viewer.