Changeset 2462 in MondoRescue for branches/2.2.10/mondo/src/mondorestore


Ignore:
Timestamp:
Oct 20, 2009, 4:07:00 PM (16 years ago)
Author:
Bruno Cornec
Message:

r3548@localhost: bruno | 2009-10-16 19:18:27 +0200

  • mindi now boots in a QEMU VM without busybox
  • mindi is now noarch as a consequence
  • MINDI_LIB becomes MINDI_DATA for coherency and as a consequence
  • CACHEDIR becomes MINDI_CACHE for coherency and it's a build parameter and not hardcoded anymore in mindi
  • THat variable is also used at restore time for mondorestore.cfg e.g.
  • FAILSAFE kernel is gone. Just use another kernel of your choice. Most std kernels work anyway
  • TurnTgzIntoRdz rewritten and now really computes data disk size and not suppose its size
  • Interface mondo/mindi changed again => incompatible
  • Non-bootable media not supported anymore.
  • Mondorescue adapted to these changes but not tested yet
  • Doc updated as well
Location:
branches/2.2.10/mondo/src/mondorestore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/mondorestore/mondo-prep.c

    r2405 r2462  
    15731573    if (pout_to_fdisk) {
    15741574        // mark relevant partition as bootable
    1575         tmp1 = call_program_and_get_last_line_of_output ("make-me-bootable /tmp/mountlist.txt dummy");
     1575        tmp1 = call_program_and_get_last_line_of_output ("make-me-bootable "MINDI_CACHE"/mountlist.txt dummy");
    15761576        mr_asprintf(tmp, "a\n%s\n", tmp1);
    15771577        mr_free(tmp1);
  • branches/2.2.10/mondo/src/mondorestore/mondo-rstr-compare.c

    r2420 r2462  
    649649    chdir(bkpinfo->restore_path);
    650650
    651     mr_asprintf(command, "cp -f /tmp/LAST-FILELIST-NUMBER %s/tmp", bkpinfo->restore_path);
    652     run_program_and_log_output(command, FALSE);
    653     mr_free(command);
    654 
    655651    mvaddstr_and_log_it(g_currentY,
    656652                        0, "Verifying archives against filesystem");
     
    705701    getcwd(dir, MAX_STR_LEN);
    706702    chdir(bkpinfo->restore_path);
    707     mr_asprintf(command, "cp -f /tmp/LAST-FILELIST-NUMBER %s/tmp", bkpinfo->restore_path);
    708     run_program_and_log_output(command, FALSE);
    709     mr_free(command);
    710703
    711704    mvaddstr_and_log_it(g_currentY,
  • branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.c

    r2451 r2462  
    2626 * The mountlist stub (appended to the directory where all.tar.gz was unpacked).
    2727 */
    28 #define MOUNTLIST_FNAME_STUB "tmp/mountlist.txt"
    29 
    30 /**
    31  * The mondo-restore.cfg stub (appended to the directory where all.tar.gz was unpacked).
     28#define MOUNTLIST_FNAME_STUB MINDI_CACHE_REL"/mountlist.txt"
     29
     30/**
     31 * The mondorestore.cfg stub (appended to the directory where all.tar.gz was unpacked).
    3232 */
    33 #define MONDO_CFG_FILE_STUB "tmp/mondo-restore.cfg"
     33#define MONDO_CFG_FILE_STUB MINDI_CACHE_REL"/mondorestore.cfg"
    3434/**
    3535 * The i-want-my-lvm stub
     
    157157
    158158/**
    159 * Extract @c mondo-restore.cfg and @c mountlist.txt from @p ramdisk_fname.
     159* Extract @c mondorestore.cfg and @c mountlist.txt from @p ramdisk_fname.
    160160* @param bkpinfo The backup information structure. @c tmpdir is the only field used.
    161161* @param ramdisk_fname The filename of the @b compressed ramdisk to look in.
     
    167167
    168168/**
    169 * Keep trying to get mondo-restore.cfg from the archive, until the user gives up.
     169* Keep trying to get mondorestore.cfg from the archive, until the user gives up.
    170170*/
    171171void get_cfg_file_from_archive_or_bust()
     
    678678/**
    679679* Fill out @p bkpinfo based on @p cfg_file.
    680 * @param cfg_file The mondo-restore.cfg file to read into @p bkpinfo.
     680* @param cfg_file The mondorestore.cfg file to read into @p bkpinfo.
    681681* @param bkpinfo The backup information structure to fill out with information
    682682* from @p cfg_file.
     
    15741574        if (!run_program_and_log_output("which grub-MR", FALSE)) {
    15751575            log_msg(1, "Yay! grub-MR found...");
    1576             mr_asprintf(command, "grub-MR %s /tmp/mountlist.txt", boot_device);
     1576            mr_asprintf(command, "grub-MR %s "MINDI_CACHE"/mountlist.txt", boot_device);
    15771577            log_msg(1, "command = %s", command);
    15781578        } else {
     
    18721872    } else {
    18731873        /* nuke mode */
    1874         mr_asprintf(command, "raw-MR %s /tmp/mountlist.txt", boot_device);
     1874        mr_asprintf(command, "raw-MR %s "MINDI_CACHE"/mountlist.txt", boot_device);
    18751875        log_msg(2, "run_raw_mbr() --- command='%s'", command);
    18761876
     
    21282128
    21292129/**
    2130  * Extract mondo-restore.cfg and the mountlist from the tape inserted
     2130 * Extract mondorestore.cfg and the mountlist from the tape inserted
    21312131 * to the ./tmp/ directory.
    21322132 * @param dev The tape device to read from.
     
    22612261            mr_free(tmp);
    22622262
    2263             if (!does_file_exist("tmp/mondo-restore.cfg")) {
     2263            if (!does_file_exist(MINDI_CACHE_REL"/mondorestore.cfg")) {
    22642264                log_to_screen("Cannot find config info on media");
    22652265                return (1);
     
    23452345    }
    23462346
    2347     log_to_screen("Recovered mondo-restore.cfg");
     2347    log_to_screen("Recovered mondorestore.cfg");
    23482348    if (!does_file_exist(MOUNTLIST_FNAME_STUB)) {
    23492349        log_to_screen("...but not mountlist.txt - a pity, really...");
  • branches/2.2.10/mondo/src/mondorestore/mondorestore.c

    r2405 r2462  
    102102
    103103/**
    104  * The location of 'mondo-restore.cfg', containing the metadata
     104 * The location of 'mondorestore.cfg', containing the metadata
    105105 * information for this backup.
    106106 */
     
    162162    assert(raidlist != NULL);
    163163    if (!bkpinfo->disaster_recovery) {
    164         strcpy(g_mountlist_fname, "/tmp/mountlist.txt");
     164        strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt");
    165165        log_msg(2, "I guess you're testing edit_mountlist()");
    166166    }
     
    20742074
    20752075    mvaddstr_and_log_it(g_currentY, 0, "Restoring from archives");
    2076     log_msg(2, "Insisting on 1st CD, so that I can have a look at LAST-FILELIST-NUMBER");
     2076    log_msg(2, "Insisting on 1st CD");
    20772077    if (g_current_media_number != 1) {
    20782078        log_msg(3, "OK, that's jacked up.");
     
    26952695        load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    26962696        if (!does_file_exist(g_mountlist_fname)) {
    2697             strcpy(g_mountlist_fname, "/tmp/mountlist.txt");
     2697            strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt");
    26982698        }
    26992699        res = let_user_edit_the_mountlist(mountlist, raidlist);
     
    27952795        log_msg(0, "Partitioning only.");
    27962796        load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    2797         strcpy(g_mountlist_fname, "/tmp/mountlist.txt");
     2797        strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt");
    27982798        load_mountlist(mountlist, g_mountlist_fname);
    27992799        res = partition_everything(mountlist);
     
    28042804        log_msg(0, "Formatting only.");
    28052805        load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    2806         strcpy(g_mountlist_fname, "/tmp/mountlist.txt");
     2806        strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt");
    28072807        load_mountlist(mountlist, g_mountlist_fname);
    28082808        res = format_everything(mountlist, FALSE, raidlist);
     
    28132813        log_msg(0, "Stopping LVM and RAID");
    28142814        load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    2815         strcpy(g_mountlist_fname, "/tmp/mountlist.txt");
     2815        strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt");
    28162816        load_mountlist(mountlist, g_mountlist_fname);
    28172817        res = do_my_funky_lvm_stuff(TRUE, FALSE);
Note: See TracChangeset for help on using the changeset viewer.