Ignore:
Timestamp:
Apr 12, 2010, 3:23:24 PM (14 years ago)
Author:
Bruno Cornec
Message:

r3783@localhost: bruno | 2010-04-11 11:57:27 +0200

  • Use MINDI_CACHE for temp file communication between archive/restore
  • Remove some now useless globals in mondo
  • Remove function get_cfg_file_from_archive_or_bust and get_cfg_file_from_archive
  • Adds function get_cfg_file_from_initrd (Not finished)
  • Recovery doesn't work in that version atm (checkpoint version)
File:
1 edited

Legend:

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

    r2508 r2623  
    1818/* Reference to global bkpinfo */
    1919extern struct s_bkpinfo *bkpinfo;
    20 
    21 extern char *g_mountlist_fname;
    2220
    2321//static char cvsid[] = "$Id$";
     
    352350    assert(bkpinfo != NULL);
    353351    mvaddstr_and_log_it(g_currentY, 0, "Comparing archives");
    354     tmp = read_cfg_var(g_mondo_cfg_file, "last-filelist-number");
     352    tmp = read_cfg_var(MINDI_CACHE"/mondorestore.cfg", "last-filelist-number");
    355353    max_val = atol(tmp);
    356354    mr_free(tmp);
     
    523521
    524522  /**************************************************************************
    525    * also deletes tmp/filelist.full & tmp/biggielist.txt _and_ tries to     *
     523   * also deletes tmp/filelist.full & biggielist.txt _and_ tries to     *
    526524   * restore them from start of tape, if available                          *
    527525   **************************************************************************/
     
    530528    assert(raidlist != NULL);
    531529
    532     while (get_cfg_file_from_archive()) {
    533         if (!ask_me_yes_or_no
    534             ("Failed to find config file/archives. Choose another source?"))
    535         {
    536             fatal_error("Unable to find config file/archives. Aborting.");
    537         }
    538         interactively_obtain_media_parameters_from_user(FALSE);
    539     }
    540 
    541     read_cfg_file_into_bkpinfo(g_mondo_cfg_file);
     530    read_cfg_file_into_bkpinfo(MINDI_CACHE"/mondorestore.cfg");
    542531
    543532    /* edit_mountlist if wanted */
    544533    log_it("About to edit mountlist");
    545534    if (g_text_mode) {
    546         save_mountlist_to_disk(mountlist, g_mountlist_fname);
    547         mr_asprintf(tmp, "%s %s", find_my_editor(), g_mountlist_fname);
     535        save_mountlist_to_disk(mountlist, MINDI_CACHE"/mountlist.txt");
     536        mr_asprintf(tmp, "%s %s", find_my_editor(), MINDI_CACHE"/mountlist.txt");
    548537        res = system(tmp);
    549538        mr_free(tmp);
    550539
    551         load_mountlist(mountlist, g_mountlist_fname);
    552     } else {
    553         res = edit_mountlist(g_mountlist_fname, mountlist, raidlist);
     540        load_mountlist(mountlist, MINDI_CACHE"/mountlist.txt");
     541    } else {
     542        res = edit_mountlist(MINDI_CACHE"/mountlist.txt", mountlist, raidlist);
    554543    }
    555544    log_it("Finished editing mountlist");
     
    557546        paranoid_MR_finish(1);
    558547    }
    559     save_mountlist_to_disk(mountlist, g_mountlist_fname);
     548    save_mountlist_to_disk(mountlist, MINDI_CACHE"/mountlist.txt");
    560549    save_raidlist_to_raidtab(raidlist, RAIDTAB_FNAME);
    561550
Note: See TracChangeset for help on using the changeset viewer.