Changeset 2321 in MondoRescue for branches/2.2.10/mondo/src/mondorestore
- Timestamp:
- Aug 18, 2009, 2:37:55 PM (15 years ago)
- Location:
- branches/2.2.10/mondo/src/mondorestore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-compare.c
r2296 r2321 675 675 0, "Verifying archives against filesystem"); 676 676 677 if (bkpinfo->disaster_recovery 678 && does_file_exist("/tmp/CDROM-LIVES-HERE")) { 677 if (bkpinfo->disaster_recovery && does_file_exist("/tmp/CDROM-LIVES-HERE")) { 679 678 strcpy(bkpinfo->media_device, 680 679 last_line_of_file("/tmp/CDROM-LIVES-HERE")); -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.c
r2316 r2321 1841 1841 void setup_MR_global_filenames() 1842 1842 { 1843 char *temppath;1844 1845 1843 assert(bkpinfo != NULL); 1846 1844 … … 1854 1852 malloc_string(g_isodir_device); 1855 1853 1856 temppath = bkpinfo->tmpdir; 1857 1858 sprintf(g_biggielist_txt, "%s/%s", temppath, BIGGIELIST_TXT_STUB); 1859 sprintf(g_filelist_full, "%s/%s", temppath, FILELIST_FULL_STUB); 1860 sprintf(g_filelist_imagedevs, "%s/tmp/filelist.imagedevs", temppath); 1861 sprintf(g_imagedevs_restthese, "%s/tmp/imagedevs.restore-these", temppath); 1854 sprintf(g_biggielist_txt, "%s/%s", bkpinfo->tmpdir, BIGGIELIST_TXT_STUB); 1855 sprintf(g_filelist_full, "%s/%s", bkpinfo->tmpdir, FILELIST_FULL_STUB); 1856 sprintf(g_filelist_imagedevs, "%s/tmp/filelist.imagedevs", bkpinfo->tmpdir); 1857 sprintf(g_imagedevs_restthese, "%s/tmp/imagedevs.restore-these", bkpinfo->tmpdir); 1862 1858 if (bkpinfo->disaster_recovery) { 1863 1859 sprintf(g_mondo_cfg_file, "/%s", MONDO_CFG_FILE_STUB); 1864 1860 sprintf(g_mountlist_fname, "/%s", MOUNTLIST_FNAME_STUB); 1865 1861 } else { 1866 sprintf(g_mondo_cfg_file, "%s/%s", temppath, MONDO_CFG_FILE_STUB);1867 sprintf(g_mountlist_fname, "%s/%s", temppath, MOUNTLIST_FNAME_STUB);1862 sprintf(g_mondo_cfg_file, "%s/%s", bkpinfo->tmpdir, MONDO_CFG_FILE_STUB); 1863 sprintf(g_mountlist_fname, "%s/%s", bkpinfo->tmpdir, MOUNTLIST_FNAME_STUB); 1868 1864 } 1869 1865 } -
branches/2.2.10/mondo/src/mondorestore/mondorestore.c
r2320 r2321 2720 2720 exit(127); 2721 2721 } 2722 if (! 2723 (bkpinfo = malloc(sizeof(struct s_bkpinfo)))) { 2724 fatal_error("Cannot malloc bkpinfo"); 2725 } 2726 reset_bkpinfo(); 2722 bkpinfo = (struct s_bkpinfo *)mr_malloc(sizeof(struct s_bkpinfo)); 2723 init_bkpinfo(); 2727 2724 2728 2725 g_loglevel = DEFAULT_MR_LOGLEVEL; 2729 2726 2730 /* Configure global variables */ 2727 /* Configure global variables */ 2728 malloc_libmondo_global_strings(); 2731 2729 #ifdef __FreeBSD__ 2732 if (strstr 2733 (call_program_and_get_last_line_of_output("cat /tmp/cmdline"), 2734 "textonly")) 2730 if (strstr(call_program_and_get_last_line_of_output("cat /tmp/cmdline"), "textonly")) 2735 2731 #else 2736 if (strstr 2737 (call_program_and_get_last_line_of_output("cat /proc/cmdline"), 2738 "textonly")) 2732 if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "textonly")) 2739 2733 #endif 2740 2734 { … … 2744 2738 g_text_mode = FALSE; 2745 2739 } // newt :-) 2746 if (!(mountlist = malloc(sizeof(struct mountlist_itself)))) { 2747 fatal_error("Cannot malloc mountlist"); 2748 } 2749 if (!(raidlist = malloc(sizeof(struct raidlist_itself)))) { 2750 fatal_error("Cannot malloc raidlist"); 2751 } 2752 2753 malloc_libmondo_global_strings(); 2754 2755 strcpy(g_mondo_home, 2756 call_program_and_get_last_line_of_output("which mondorestore")); 2740 2741 /* Init GUI */ 2742 setup_newt_stuff(); /* call newtInit and setup screen log */ 2743 2744 strcpy(g_mondo_home, call_program_and_get_last_line_of_output("which mondorestore")); 2757 2745 g_current_media_number = 1; // precaution 2758 2746 … … 2774 2762 log_msg(1, "FYI - g_mountlist_fname = %s", g_mountlist_fname); 2775 2763 if (strlen(g_mountlist_fname) < 3) { 2776 fatal_error 2777 ("Serious error in malloc()'ing. Could be a bug in your glibc."); 2764 fatal_error("Serious error in malloc()'ing. Could be a bug in your glibc."); 2778 2765 } 2779 2766 mkdir(MNT_CDROM, 0x770); … … 2783 2770 mr_asprintf(&tmp, "%s.orig", g_mountlist_fname); 2784 2771 if (!does_file_exist(g_mountlist_fname)) { 2785 log_msg(2, 2786 "%ld: Warning - g_mountlist_fname (%s) does not exist yet", 2787 __LINE__, g_mountlist_fname); 2772 log_msg(2, "%ld: Warning - g_mountlist_fname (%s) does not exist yet", __LINE__, g_mountlist_fname); 2788 2773 } else if (!does_file_exist(tmp)) { 2789 2774 mr_free(tmp); … … 2797 2782 make_hole_for_dir("/tmp/tmpfs"); /* just in case... */ 2798 2783 run_program_and_log_output("umount " MNT_CDROM, FALSE); 2799 /*2800 run_program_and_log_output("ln -sf /var/log/mondo-archive.log /tmp/mondorestore.log",2801 FALSE);2802 */2803 2784 2804 2785 run_program_and_log_output("rm -Rf /tmp/tmpfs/mondo.tmp.*", FALSE); 2805 2786 2806 /* Init GUI */2807 setup_newt_stuff(); /* call newtInit and setup screen log */2808 2787 welcome_to_mondorestore(); 2809 2788 if (bkpinfo->disaster_recovery) { … … 2814 2793 2815 2794 log_it("what time is it"); 2795 2796 mountlist = (struct mountlist_itself *)mr_malloc(sizeof(struct mountlist_itself)); 2797 raidlist = (struct raidlist_itself *)mr_malloc(sizeof(struct raidlist_itself)); 2816 2798 2817 2799 /* Process command-line parameters */ -
branches/2.2.10/mondo/src/mondorestore/mr-externs.h
r2316 r2321 61 61 extern char *popup_and_get_string(char *, char *, char *); 62 62 extern void setup_newt_stuff(void); 63 extern void reset_bkpinfo();63 extern void init_bkpinfo(); 64 64 extern int read_cfg_var(char *, char *, char *); 65 65 extern int read_file_from_stream_to_file(char *,
Note:
See TracChangeset
for help on using the changeset viewer.