Changeset 2462 in MondoRescue for branches/2.2.10/mondo/src/mondorestore
- Timestamp:
- Oct 20, 2009, 4:07:00 PM (16 years ago)
- Location:
- branches/2.2.10/mondo/src/mondorestore
- Files:
-
- 4 edited
-
mondo-prep.c (modified) (1 diff)
-
mondo-rstr-compare.c (modified) (2 diffs)
-
mondo-rstr-tools.c (modified) (9 diffs)
-
mondorestore.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/mondorestore/mondo-prep.c
r2405 r2462 1573 1573 if (pout_to_fdisk) { 1574 1574 // 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"); 1576 1576 mr_asprintf(tmp, "a\n%s\n", tmp1); 1577 1577 mr_free(tmp1); -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-compare.c
r2420 r2462 649 649 chdir(bkpinfo->restore_path); 650 650 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 655 651 mvaddstr_and_log_it(g_currentY, 656 652 0, "Verifying archives against filesystem"); … … 705 701 getcwd(dir, MAX_STR_LEN); 706 702 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);710 703 711 704 mvaddstr_and_log_it(g_currentY, -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.c
r2451 r2462 26 26 * The mountlist stub (appended to the directory where all.tar.gz was unpacked). 27 27 */ 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). 32 32 */ 33 #define MONDO_CFG_FILE_STUB "tmp/mondo-restore.cfg"33 #define MONDO_CFG_FILE_STUB MINDI_CACHE_REL"/mondorestore.cfg" 34 34 /** 35 35 * The i-want-my-lvm stub … … 157 157 158 158 /** 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. 160 160 * @param bkpinfo The backup information structure. @c tmpdir is the only field used. 161 161 * @param ramdisk_fname The filename of the @b compressed ramdisk to look in. … … 167 167 168 168 /** 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. 170 170 */ 171 171 void get_cfg_file_from_archive_or_bust() … … 678 678 /** 679 679 * 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. 681 681 * @param bkpinfo The backup information structure to fill out with information 682 682 * from @p cfg_file. … … 1574 1574 if (!run_program_and_log_output("which grub-MR", FALSE)) { 1575 1575 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); 1577 1577 log_msg(1, "command = %s", command); 1578 1578 } else { … … 1872 1872 } else { 1873 1873 /* 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); 1875 1875 log_msg(2, "run_raw_mbr() --- command='%s'", command); 1876 1876 … … 2128 2128 2129 2129 /** 2130 * Extract mondo -restore.cfg and the mountlist from the tape inserted2130 * Extract mondorestore.cfg and the mountlist from the tape inserted 2131 2131 * to the ./tmp/ directory. 2132 2132 * @param dev The tape device to read from. … … 2261 2261 mr_free(tmp); 2262 2262 2263 if (!does_file_exist( "tmp/mondo-restore.cfg")) {2263 if (!does_file_exist(MINDI_CACHE_REL"/mondorestore.cfg")) { 2264 2264 log_to_screen("Cannot find config info on media"); 2265 2265 return (1); … … 2345 2345 } 2346 2346 2347 log_to_screen("Recovered mondo -restore.cfg");2347 log_to_screen("Recovered mondorestore.cfg"); 2348 2348 if (!does_file_exist(MOUNTLIST_FNAME_STUB)) { 2349 2349 log_to_screen("...but not mountlist.txt - a pity, really..."); -
branches/2.2.10/mondo/src/mondorestore/mondorestore.c
r2405 r2462 102 102 103 103 /** 104 * The location of 'mondo -restore.cfg', containing the metadata104 * The location of 'mondorestore.cfg', containing the metadata 105 105 * information for this backup. 106 106 */ … … 162 162 assert(raidlist != NULL); 163 163 if (!bkpinfo->disaster_recovery) { 164 strcpy(g_mountlist_fname, "/tmp/mountlist.txt");164 strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt"); 165 165 log_msg(2, "I guess you're testing edit_mountlist()"); 166 166 } … … 2074 2074 2075 2075 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"); 2077 2077 if (g_current_media_number != 1) { 2078 2078 log_msg(3, "OK, that's jacked up."); … … 2695 2695 load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME); 2696 2696 if (!does_file_exist(g_mountlist_fname)) { 2697 strcpy(g_mountlist_fname, "/tmp/mountlist.txt");2697 strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt"); 2698 2698 } 2699 2699 res = let_user_edit_the_mountlist(mountlist, raidlist); … … 2795 2795 log_msg(0, "Partitioning only."); 2796 2796 load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME); 2797 strcpy(g_mountlist_fname, "/tmp/mountlist.txt");2797 strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt"); 2798 2798 load_mountlist(mountlist, g_mountlist_fname); 2799 2799 res = partition_everything(mountlist); … … 2804 2804 log_msg(0, "Formatting only."); 2805 2805 load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME); 2806 strcpy(g_mountlist_fname, "/tmp/mountlist.txt");2806 strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt"); 2807 2807 load_mountlist(mountlist, g_mountlist_fname); 2808 2808 res = format_everything(mountlist, FALSE, raidlist); … … 2813 2813 log_msg(0, "Stopping LVM and RAID"); 2814 2814 load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME); 2815 strcpy(g_mountlist_fname, "/tmp/mountlist.txt");2815 strcpy(g_mountlist_fname, MINDI_CACHE"/mountlist.txt"); 2816 2816 load_mountlist(mountlist, g_mountlist_fname); 2817 2817 res = do_my_funky_lvm_stuff(TRUE, FALSE);
Note:
See TracChangeset
for help on using the changeset viewer.
