Changeset 1913


Ignore:
Timestamp:
Apr 14, 2008, 2:48:40 PM (11 years ago)
Author:
bruno
Message:

Extract of mandatory files is now under ./tmp/.. instead of tmp/.. as we now use ar to create the all.tar.gz

Location:
branches/2.2.6
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.6/mindi/mindi

    r1912 r1913  
    6565PCMCIA_MODS="pcmcia_core ds yenta_socket"
    6666USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage input hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd usbkbd usbhid keybdev mousedev libusual"
    67 CDROM_MODS="$TAPE_MODS $IDE_MODS af_packet cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 nls_utf8 sg sr_mod zlib_inflate $USB_MODS $PCMCIA_MODS"
     67CDROM_MODS="$TAPE_MODS $IDE_MODS af_packet cdrom isocd isofs inflate_fs nls_iso8859-1 nls_base nls_cp437 nls_utf8 sg sr_mod zlib_inflate iso9660 $USB_MODS $PCMCIA_MODS"
    6868NET_MODS="sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 e1000 eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmnet"
    6969EXTRA_MODS="$CDROM_MODS vfat fat loop md-mod linear raid0 raid1 xor raid5 raid456 lvm-mod dm-mod dm-snapshot dm-zero dm-mirror jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd mbcache"
     
    24462446        if [ -e "$s" ] ; then
    24472447            #cp --parents -af $s . 2>> $LOGFILE
    2448             tar cf - $s | tar xf - 2> /dev/null
     2448            tar cf - $s 2> /dev/null | tar xf -
    24492449        fi
    24502450    done
     
    24542454
    24552455    # Handle the case where busybox and mount are dynamically linked
    2456     # Should be done first so that if /lib64 is a link, it's
    2457     # created first like that, instead of as a real dir later on
    24582456    file $MINDI_LIB/rootfs/bin/busybox 2>&1 | grep -q "dynamically"
    24592457    if [ $? -eq 0 ]; then
     
    24622460        LocateDeps $MINDI_LIB/rootfs/bin/busybox /bin/mount > $MINDI_TMP/busy.lis
    24632461        #cp --parents -Rdf `sort -u $MINDI_TMP/busy.lis` .
    2464         tar cf - `sort -u $MINDI_TMP/busy.lis` | tar xf - 2> /dev/null
     2462        tar cf - $MINDI_LIB/rootfs/bin/busybox /bin/mount `sort -u $MINDI_TMP/busy.lis` 2> /dev/null | tar xf -
    24652463        rm -f $MINDI_TMP/busy.lis
    24662464    fi
     
    24722470        LogIt "udev device manager found"
    24732471        #cp --parents -Rdf /etc/udev . 2> /dev/null
    2474         tar cf - /etc/udev | tar xf - 2> /dev/null
     2472        tar cf - /etc/udev 2> /dev/null | tar xf -
    24752473        # This avoids NIC remapping if on another machine at restore time on Debian at least
    24762474        rm -f ./etc/udev/rules.d/z25_persistent-net.rules
    24772475        #cp --parents -Rdf /lib/udev /lib64/udev . 2> /dev/null
    2478         tar cf - /lib*/udev | tar xf - 2> /dev/null
     2476        tar cf - /lib*/udev 2> /dev/null | tar xf -
    24792477        if [ -x /sbin/udevd ]; then
    24802478            lis2=`grep -Ev '^#' $MINDI_CONF/udev.files`
     
    25032501            done
    25042502            #cp --parents -Rdf $lis `sort -u $MINDI_TMP/udev.lis` .
    2505             tar cf - $lis `sort -u $MINDI_TMP/udev.lis` | tar xf - 2> /dev/null
     2503            tar cf - $lis `sort -u $MINDI_TMP/udev.lis` 2> /dev/null | tar xf -
    25062504            rm -f $MINDI_TMP/udev.lis
    25072505        else
     
    25222520            LocateDeps $lis > $MINDI_TMP/tools.lis
    25232521            #cp --parents -Rdf $lis `sort -u $MINDI_TMP/tools.lis` .
    2524             tar cf - $lis `sort -u $MINDI_TMP/tools.lis` | tar xf - 2> /dev/null
     2522            tar cf - $lis `sort -u $MINDI_TMP/tools.lis` 2> /dev/null | tar xf -
    25252523        fi
    25262524        if [ -f $MINDI_CACHE/mindi-rsthw ]; then
     
    25422540
    25432541    #cp --parents -Rdf /dev/fd0*[1,2][4,7,8]* . 2> /dev/null
    2544     tar cf - /dev/fd0*[1,2][4,7,8]* | tar xf - 2> /dev/null
     2542    tar cf - /dev/fd0*[1,2][4,7,8]* 2> /dev/null | tar xf -
    25452543
    25462544    cd $old_pwd
     
    25862584        echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE
    25872585        #cp --parents -Rpdf $i $mountpoint 2>/dev/null || LogIt "Unable to copy $i to $mountpoint"
    2588         tar cf - $i | (cd $mountpoint ; tar xf -) 2>/dev/null || LogIt "Unable to copy $i to $mountpoint"
     2586        tar cf - $i 2>/dev/null | (cd $mountpoint ; tar xf -) || LogIt "Unable to copy $i to $mountpoint"
    25892587        # Uncompress modules if not useing udev and native modprobe
    25902588        if [ ! -f $mountpoint/tmp/USE-UDEV ]; then
     
    25982596    # Also copy modules.dep in case of udev so that normal modprobe works
    25992597    #cp --parents -Rpdf /$needed_modules_path/modules.dep $mountpoint 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
    2600     tar cf - /$needed_modules_path/modules.dep | (cd $mountpoint ; tar xf -) 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
     2598    tar cf - /$needed_modules_path/modules.dep 2>/dev/null | (cd $mountpoint ; tar xf -) || LogIt "Unable to copy modules.dep to $mountpoint"
    26012599
    26022600    # For all modules supported, create symlinks under the mountpoint
     
    30733071    cd $MINDI_TMP/small-all
    30743072    cp -f $MINDI_TMP/{mountlist.txt,mondo-restore.cfg,filelist.full.gz,biggielist.txt} tmp 2>/dev/null || Die "Cannot copy small all.tar.gz"
    3075     tar -cv tmp | gzip -9 > $MINDI_TMP/all.tar.gz || Die "Cannot make small all.tar.gz"
     3073    tar -cv ./tmp | gzip -9 > $MINDI_TMP/all.tar.gz || Die "Cannot make small all.tar.gz"
    30763074    sleep 2
    30773075    LogIt "Done. Exiting."
  • branches/2.2.6/mindi/mindi-bkphw

    r1911 r1913  
    1616die "No CACHE_DIR parameter" if ((not defined $ARGV[0]) || (! -d $ARGV[0]));
    1717my $locbkpdir = "/bkphw";
    18 my $bkpdir = "$ARGV[0]$locbckdir";
     18my $bkpdir = "$ARGV[0]$locbkpdir";
    1919die "No CONF_DIR parameter" if ((not defined $ARGV[1]) || (! -d $ARGV[1]));
    2020my $confdir = "$ARGV[1]";
  • branches/2.2.6/mondo/src/common/libmondo-stream.c

    r1899 r1913  
    796796    (void) getcwd(old_cwd, MAX_STR_LEN);
    797797    chdir(bkpinfo->tmpdir);
    798     sprintf(tmp, "tar -zxf %s tmp/mondo-restore.cfg 2> /dev/null",
     798    sprintf(tmp, "tar -zxf %s ./tmp/mondo-restore.cfg 2> /dev/null",
    799799            outfname);
    800800    paranoid_system(tmp);
  • branches/2.2.6/mondo/src/common/my-stuff.h

    r1885 r1913  
    215215 * The biggielist stub (appended to the directory where all.tar.gz was unpacked).
    216216 */
    217 #define BIGGIELIST_TXT_STUB "tmp/biggielist.txt"
     217#define BIGGIELIST_TXT_STUB "./tmp/biggielist.txt"
    218218
    219219/**
    220220 * The filelist stub (appended to the directory where all.tar.gz was unpacked).
    221221 */
    222 #define FILELIST_FULL_STUB "tmp/filelist.full.gz"
     222#define FILELIST_FULL_STUB "./tmp/filelist.full.gz"
    223223
    224224/**
    225225 * The mountlist stub (appended to the directory where all.tar.gz was unpacked).
    226226 */
    227 #define MOUNTLIST_FNAME_STUB "tmp/mountlist.txt"
     227#define MOUNTLIST_FNAME_STUB "./tmp/mountlist.txt"
    228228
    229229/**
    230230 * The mondo-restore.cfg stub (appended to the directory where all.tar.gz was unpacked).
    231231 */
    232 #define MONDO_CFG_FILE_STUB "tmp/mondo-restore.cfg"
     232#define MONDO_CFG_FILE_STUB "./tmp/mondo-restore.cfg"
    233233/**
    234234 * The location where mindi media images are stored.
  • branches/2.2.6/mondo/src/mondorestore/mondo-restore.c

    r1902 r1913  
    27772777    paranoid_fclose(fout);
    27782778    sprintf(command,
    2779             "tar -zxvf %s tmp/mondo-restore.cfg tmp/mountlist.txt tmp/filelist.full tmp/biggielist.txt",
     2779            "tar -zxvf %s ./tmp/mondo-restore.cfg ./tmp/mountlist.txt ./tmp/filelist.full ./tmp/biggielist.txt",
    27802780            datadisks_fname);
    27812781    run_program_and_log_output(command, 4);
  • branches/2.2.6/mondo/src/mondorestore/mondo-rstr-tools.c

    r1909 r1913  
    12881288            BIGGIELIST_TXT_STUB,
    12891289            FILELIST_FULL_STUB,
    1290             "tmp/i-want-my-lvm", MONDO_CFG_FILE_STUB);
     1290            "./tmp/i-want-my-lvm", MONDO_CFG_FILE_STUB);
    12911291    log_msg(1, "tarcommand = %s", command);
    12921292    run_program_and_log_output(command, 1);
     
    13041304            BIGGIELIST_TXT_STUB,
    13051305            FILELIST_FULL_STUB,
    1306             "tmp/i-want-my-lvm", MONDO_CFG_FILE_STUB);
     1306            "./tmp/i-want-my-lvm", MONDO_CFG_FILE_STUB);
    13071307
    13081308    log_msg(1, "tarcommand = %s", command);
     
    13111311    if (!does_file_exist(BIGGIELIST_TXT_STUB)) {
    13121312        fatal_error
    1313             ("all.tar.gz did not include tmp/biggielist.txt");
     1313            ("all.tar.gz did not include ./tmp/biggielist.txt");
    13141314    }
    13151315    if (!does_file_exist(FILELIST_FULL_STUB)) {
    13161316        fatal_error
    1317             ("all.tar.gz did not include tmp/filelist.full.gz");
     1317            ("all.tar.gz did not include ./tmp/filelist.full.gz");
    13181318    }
    13191319}
     
    22782278            1024L * 1024 * 32 / tape_block_size,
    22792279            MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB,
    2280             BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, "tmp/i-want-my-lvm");
     2280            BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, "./tmp/i-want-my-lvm");
    22812281    log_msg(2, "command = '%s'", command);
    22822282    res = run_program_and_log_output(command, -1);
     
    24072407                log_msg(2,
    24082408                        "gcffa --- Plan B, a.k.a. untarring some file from all.tar.gz");
    2409                 sprintf(command, "tar -zxvf " MNT_CDROM "/images/all.tar.gz %s %s %s %s %s", MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB, BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, "tmp/i-want-my-lvm");  // add -b TAPE_BLOCK_SIZE if you _really_ think it's necessary
     2409                sprintf(command, "tar -zxvf " MNT_CDROM "/images/all.tar.gz %s %s %s %s %s", MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB, BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, "./tmp/i-want-my-lvm");    // add -b TAPE_BLOCK_SIZE if you _really_ think it's necessary
    24102410                run_program_and_log_output(command, TRUE);
    24112411                if (!does_file_exist(MONDO_CFG_FILE_STUB)) {
Note: See TracChangeset for help on using the changeset viewer.