Changeset 8456


Ignore:
Timestamp:
2007-08-21T20:23:57+02:00 (9 years ago)
Author:
nbd
Message:

add sysupgrade script for config preserving system upgrades. only implemented for x86-2.6 at the moment, but can be ported to other platforms easily

Location:
trunk
Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/files/etc/preinit

    r7870 r8456  
    6161lock -w /tmp/.failsafe 
    6262mount_root 
     63[ -f /sysupgrade.tgz ] && { 
     64        echo "- config restore -" 
     65        cd / 
     66        mv sysupgrade.tgz /tmp 
     67        tar xzf /tmp/sysupgrade.tgz 
     68        rm -f /tmp/sysupgrade.tgz 
     69        sync 
     70} 
    6371 
    6472echo "- init -" 
  • trunk/package/mtd/src/jffs2.c

    r8444 r8456  
    148148                fname = name; 
    149149 
    150         inode = add_dirent(name, IFTODT(S_IFREG), parent); 
     150        inode = add_dirent(fname, IFTODT(S_IFREG), parent); 
    151151        memset(&ri, 0, sizeof(ri)); 
    152152        ri.magic = JFFS2_MAGIC_BITMASK; 
     
    224224        } 
    225225 
     226        if (!*dir) 
     227                target_ino = 1; 
     228 
    226229        /* parse the structure of the jffs2 first 
    227230         * locate the directory that the file is going to be placed in */ 
     
    254257                                         
    255258                                        /* is this the right directory name and is it a subdirectory of / */ 
    256                                         if ((de->pino == 1) && !strncmp(de->name, dir, de->nsize)) 
     259                                        if (*dir && (de->pino == 1) && !strncmp(de->name, dir, de->nsize)) 
    257260                                                target_ino = de->ino; 
    258261 
  • trunk/package/mtd/src/mtd.c

    r8444 r8456  
    5353#define DEBUG 
    5454 
    55 #define JFFS2_DEFAULT_DIR       "tmp" 
     55#define JFFS2_DEFAULT_DIR       "" /* directory name without /, empty means root dir */ 
    5656 
    5757#define SYSTYPE_UNKNOWN     0 
Note: See TracChangeset for help on using the changeset viewer.