Changeset 539 in MondoRescue for trunk/mondo
- Timestamp:
- May 13, 2006, 7:38:44 PM (18 years ago)
- Location:
- trunk/mondo
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/distributions/conf/mondo.conf
r537 r539 13 13 # as they will be generated by mondoarchive 14 14 # 15 iso_creation_cmd="/usr/bin/mkisofs"15 mondo_iso_creation_cmd="/usr/bin/mkisofs" 16 16 #iso_creation_cmd="/usr/bin/growisofs" 17 17 … … 20 20 # do not specify the -o, -c or the -b options, nor the directory to backup 21 21 # 22 iso_creation_options="-J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL_Version -V _CD#_"22 mondo_iso_creation_options="-J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL_Version -V _CD#_" 23 23 #iso_creation_options="-use-the-force-luke -v -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL_Version -V _CD#_" 24 24 … … 26 26 # ISO Burning CLI command to use 27 27 # 28 iso_burning_cmd="/usr/bin/cdrecord"28 mondo_iso_burning_cmd="/usr/bin/cdrecord" 29 29 30 30 # 31 31 # ISO Burning CLI command options 32 iso_burning_options="-eject dev=%s speed=%d fs=24m driveropts=burnfree"32 mondo_iso_burning_options="-eject dev=%s speed=%d fs=24m driveropts=burnfree" 33 33 34 34 # 35 35 # ISO Burning Speed (optional) 36 36 # 37 # iso_burning_speed=137 #mondo_iso_burning_speed=1 38 38 39 39 # … … 42 42 # Use 4380 for DVDs, 650 or 700 for CDs 43 43 # 44 m edia_size=438044 mondo_media_size=4380 45 45 46 46 # … … 49 49 # Use /dev/hdc, /dev/sr0, /dev/st0, ATAPI:0,0,0, ... 50 50 # 51 m edia_device="/dev/hdc"51 mondo_media_device="/dev/hdc" 52 52 53 53 # 54 54 # Is the CD tray manual ? (yes|no) 55 55 # 56 m anual_tray=no56 mondo_manual_tray=no 57 57 58 58 # 59 59 # Default log level 60 60 # 61 log_level=461 mondo_log_level=4 62 62 63 63 # 64 64 # default prefix for ISO names 65 65 # 66 prefix=mondorescue66 mondo_prefix=mondorescue 67 67 68 68 # 69 69 # External tape blocksize 70 70 # 71 external_tape_blocksize=13107271 mondo_external_tape_blocksize=131072 72 72 73 73 # 74 74 # Internal tape blocksize 75 75 # 76 internal_tape_blocksize=819276 mondo_internal_tape_blocksize=8192 77 77 78 78 # 79 79 # Size of the slices for biggiefiles 80 80 # 81 slice_size=409681 mondo_slice_size=4096 82 82 83 83 # 84 84 # deplist file used 85 85 # 86 deplist_file="/etc/mondorescue/deplist.txt"86 mondo_deplist_file="/etc/mondo/deplist.txt" 87 87 88 88 # 89 89 # Write boot floppies (yes|no) ? 90 90 # 91 write_boot_floppy=no91 mondo_write_boot_floppy=no 92 92 93 93 # 94 # Write mindi CD (yes|no) ?94 # Create mindi CD (yes|no) ? 95 95 # 96 write_mindi_cd=no96 mondo_create_mindi_cd=no 97 97 98 98 # 99 99 # Kernel to use (NATIVE|FAILSAFE|PATH TO THE KERNEL) 100 100 # 101 mondo rescue_kernel="NATIVE"101 mondo_kernel="NATIVE" 102 102 #mondorescue_kernel="/boot/vmlinuz.special" 103 103 104 104 # 105 # Additi nal modules to support105 # Additional modules to support 106 106 # (white space separated list of modules) 107 107 # 108 additional_modules=""108 mondo_additional_modules="" 109 109 110 110 # … … 112 112 # (GRUB|ELILO|LILO|RAW|NATIVE) 113 113 # 114 boot_loader=NATIVE114 mondo_boot_loader=NATIVE 115 115 116 116 # 117 117 # Differential backup or full (yes|no) 118 118 # 119 differential=no119 mondo_differential=no 120 120 121 121 # 122 122 # Default compression tool 123 123 # 124 compression_tool="/usr/bin/bzip2"124 mondo_compression_tool="/usr/bin/bzip2" 125 125 126 126 # 127 127 # Default compression level 128 128 # 129 compression_level=3129 mondo_compression_level=3 130 130 131 131 # … … 133 133 # (white space separated list of paths) 134 134 # 135 exclude_files=""135 mondo_exclude_files="" 136 136 137 137 # … … 139 139 # (white space separated list of paths) 140 140 # 141 include_files=""141 mondo_include_files="" 142 142 143 143 # 144 144 # Activate semi-graphical mode by default (yes|no) 145 145 # 146 text_mode=no146 mondo_text_mode=no 147 147 148 148 # … … 150 150 # (look at -H option in man page) 151 151 # 152 automatic_restore=no152 mondo_automatic_restore=no 153 153 154 154 # 155 155 # Scratch directory 156 156 # 157 scratch_dir=""157 mondo_scratch_dir="" 158 158 #scratch_dir="/tmp/mondo/scratch" 159 159 … … 161 161 # Temporary directory 162 162 # 163 tmp_dir=""163 mondo_tmp_dir="" 164 164 #tmp_dir="/tmp/mondo/tmp" 165 165 … … 167 167 # Images creation dir 168 168 # 169 images_dir="/var/cache/mondo"169 mondo_images_dir="/var/cache/mondo" -
trunk/mondo/mondo/common/Makefile.am
r507 r539 9 9 libmondo_a_SOURCES = libmondo-archive.c libmondo-devices.c libmondo-fifo.c \ 10 10 libmondo-filelist.c libmondo-files.c libmondo-fork.c \ 11 libmondo-mountlist.c libmondo-raid.c \11 libmondo-mountlist.c libmondo-raid.c libmondo-msg.c \ 12 12 libmondo-stream.c libmondo-string.c libmondo-tools.c \ 13 13 libmondo-verify.c newt-specific.c \ -
trunk/mondo/mondo/common/libmondo-archive-EXT.h
r483 r539 15 15 extern int make_slices_and_images(struct s_bkpinfo *bkpinfo, 16 16 char *biggielist_fname); 17 extern int make_iso_fs(struct s_bkpinfo *bkpinfo, char *destfile);17 extern int make_iso_fs(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf, char *destfile); 18 18 extern int make_afioballs_and_images(struct s_bkpinfo *bkpinfo); 19 19 extern int (*move_files_to_cd) (struct s_bkpinfo *, char *, ...); -
trunk/mondo/mondo/common/libmondo-archive.c
r507 r539 419 419 * @ingroup archiveGroup 420 420 */ 421 int backup_data(struct s_bkpinfo *bkpinfo )421 int backup_data(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf) 422 422 { 423 423 int retval = 0, res = 0; … … 485 485 run_program_and_log_output(tmp, 1); 486 486 paranoid_free(tmp); 487 retval += make_those_afios_phase(bkpinfo); // backup regular files488 487 retval += make_those_slices_phase(bkpinfo); // backup BIG files 489 488 retval += do_that_final_phase(bkpinfo); // clean up … … 876 875 if (!res) { 877 876 log_to_screen("Boot+data disks were created OK"); 878 asprintf(&command, "mkdir -p / root/images/mindi/");877 asprintf(&command, "mkdir -p /var/cache/mindi/"); 879 878 log_msg(2, command); 880 879 run_program_and_log_output(command, FALSE); … … 882 881 883 882 asprintf(&command, 884 "cp -f %s/images/mindi.iso / root/images/mindi/mondorescue.iso",883 "cp -f %s/images/mindi.iso /var/cache/mindi/mondorescue.iso", 885 884 bkpinfo->scratchdir); 886 885 log_msg(2, command); … … 1107 1106 * @ingroup MLarchiveGroup 1108 1107 */ 1109 int do_that_final_phase(struct s_bkpinfo *bkpinfo )1108 int do_that_final_phase(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf) 1110 1109 { 1111 1110 … … 1126 1125 } else { 1127 1126 /* write final ISO */ 1128 res = write_final_iso_if_necessary(bkpinfo );1127 res = write_final_iso_if_necessary(bkpinfo, mrconf); 1129 1128 retval += res; 1130 1129 if (res) { … … 1406 1405 * @return The number of errors encountered (0 for success) 1407 1406 */ 1408 int make_afioballs_and_images(struct s_bkpinfo *bkpinfo )1407 int make_afioballs_and_images(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf) 1409 1408 { 1410 1409 … … 1548 1547 NULL); 1549 1548 } else { 1550 res = move_files_to_cd(bkpinfo, storing_filelist_fname, 1551 curr_xattr_list_fname, 1552 curr_acl_list_fname, 1553 storing_afioball_fname, NULL); 1549 res = 1550 move_files_to_cd(bkpinfo, mrconf, storing_filelist_fname, 1551 curr_xattr_list_fname, 1552 curr_acl_list_fname, 1553 storing_afioball_fname, NULL); 1554 1554 } 1555 1555 paranoid_free(storing_filelist_fname); … … 1628 1628 * @return The number of errors encountered (0 for success) 1629 1629 */ 1630 int make_iso_fs(struct s_bkpinfo *bkpinfo, char *destfile)1630 int make_iso_fs(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf, char *destfile) 1631 1631 { 1632 1632 /*@ int ********************************************** */ … … 1822 1822 #ifdef __IA64__ 1823 1823 log_msg(1, "IA64 --> elilo"); 1824 asprintf(&tmp2,"mkisofs -no-emul-boot -b images/mindi-bootroot.%s.img -c boot.cat -o _ISO_ -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", mrconf->ia64_boot_size); 1824 1825 res = eval_call_to_make_ISO(bkpinfo, 1825 "mkisofs -no-emul-boot -b images/mindi-bootroot." 1826 IA64_BOOT_SIZE 1827 ".img -c boot.cat -o _ISO_ -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", 1826 tmp2, 1828 1827 destfile, 1829 1828 g_current_media_number, … … 1833 1832 // FIXME --- change mkisofs string to MONDO_MKISOFS_REGULAR_SYSLINUX/LILO depending on bkpinfo->make_cd_usE_lilo 1834 1833 // and add ' .' at end 1834 paranoid_free(tmp2); 1835 1835 log_msg(1, "Non-ia64 --> lilo"); 1836 1836 res = eval_call_to_make_ISO(bkpinfo, … … 1956 1956 */ 1957 1957 int 1958 make_slices_and_images(struct s_bkpinfo *bkpinfo, char *biggielist_fname)1958 make_slices_and_images(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf, char *biggielist_fname) 1959 1959 { 1960 1960 … … 2029 2029 } else { 2030 2030 // Call ntfsclone (formerly partimagehack) if it's a /dev entry (i.e. a partition to be imaged) 2031 log_msg(2, "bigfile_fname = %s", bigfile_fname);2031 log_msg(2, "bigfile_fname = '%s'", bigfile_fname); 2032 2032 use_ntfsprog = FALSE; 2033 2033 if (!strncmp(bigfile_fname, "/dev/", 5) … … 2076 2076 } 2077 2077 res = 2078 slice_up_file_etc(bkpinfo, bigfile_fname,2078 slice_up_file_etc(bkpinfo, mrconf, bigfile_fname, 2079 2079 ntfsprog_fifo, biggie_file_number, 2080 2080 noof_biggie_files, use_ntfsprog); … … 2125 2125 * @see make_afioballs_and_images 2126 2126 */ 2127 int make_afioballs_and_images_OLD(struct s_bkpinfo *bkpinfo )2127 int make_afioballs_and_images_OLD(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf) 2128 2128 { 2129 2129 … … 2198 2198 res = move_files_to_stream(bkpinfo, curr_afioball_fname, NULL); 2199 2199 } else { 2200 res = move_files_to_cd(bkpinfo, curr_filelist_fname, 2201 curr_xattr_list_fname, 2202 curr_acl_list_fname, 2203 curr_afioball_fname, NULL); 2200 res = 2201 move_files_to_cd(bkpinfo, mrconf, curr_filelist_fname, 2202 curr_xattr_list_fname, 2203 curr_acl_list_fname, curr_afioball_fname, 2204 NULL); 2204 2205 } 2205 2206 retval += res; … … 2246 2247 * @ingroup MLarchiveGroup 2247 2248 */ 2248 int make_those_afios_phase(struct s_bkpinfo *bkpinfo )2249 int make_those_afios_phase(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf) 2249 2250 { 2250 2251 /*@ int ******************************************* */ … … 2263 2264 log_msg(1, 2264 2265 "Using single-threaded make_afioballs_and_images() to suit b0rken FreeBSD 5.0"); 2265 res = make_afioballs_and_images_OLD(bkpinfo );2266 res = make_afioballs_and_images_OLD(bkpinfo, mrconf); 2266 2267 #else 2267 res = make_afioballs_and_images_OLD(bkpinfo );2268 res = make_afioballs_and_images_OLD(bkpinfo, mrconf); 2268 2269 #endif 2269 2270 write_header_block_to_stream(0, "stop-afioballs", 2270 2271 BLK_STOP_AFIOBALLS); 2271 2272 } else { 2272 res = make_afioballs_and_images(bkpinfo );2273 res = make_afioballs_and_images(bkpinfo, mrconf); 2273 2274 } 2274 2275 … … 2376 2377 * transfer files over the network) or leave it as is. 2377 2378 */ 2378 int (*move_files_to_cd) (struct s_bkpinfo *, char *, ...) =2379 int (*move_files_to_cd) (struct s_bkpinfo *, struct s_mrconf *mrconf, char *, ...) = 2379 2380 _move_files_to_cd; 2380 2381 … … 2397 2398 * @return The number of errors encountered (0 for success) 2398 2399 */ 2399 int _move_files_to_cd(struct s_bkpinfo *bkpinfo, char *files_to_add, ...)2400 int _move_files_to_cd(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf, char *files_to_add, ...) 2400 2401 { 2401 2402 … … 2436 2437 if (would_occupy / 1024 > bkpinfo->media_size[g_current_media_number]) { 2437 2438 /* FALSE because this is not the last CD we'll write */ 2438 res = write_iso_and_go_on(bkpinfo, FALSE);2439 res = write_iso_and_go_on(bkpinfo, mrconf, FALSE); 2439 2440 retval += res; 2440 2441 if (res) { … … 2480 2481 * @c backup_media_type field is used in this function. 2481 2482 * @param imagesdir The directory containing the floppy images (usually 2482 * / root/images/mindi).2483 * /var/cache/mindi). 2483 2484 * 2484 2485 * @return The number of errors encountered (0 for success) … … 2653 2654 if (!bkpinfo->nonbootable_backup) { 2654 2655 #ifdef __FreeBSD__ 2655 if (!does_file_exist("/ root/images/mindi/mindi-kern.1722.img"))2656 if (!does_file_exist("/var/cache/mindi/mindi-kern.1722.img")) 2656 2657 #else 2657 if (!does_file_exist("/root/images/mindi/mindi-bootroot.1722.img") 2658 && !does_file_exist("/root/images/mindi/mindi-boot.1440.img")) 2658 if (!does_file_exist("/var/cache/mindi/mindi-bootroot.1722.img") 2659 && !does_file_exist("/var/cache/mindi/mindi-boot.1440.img") 2660 && !does_file_exist("/var/cache/mindi/mindi-boot.2880.img") 2661 && !does_file_exist("/var/cache/mindi/mindi-boot.5760.img")) 2659 2662 #endif 2660 2663 { 2661 2664 mvaddstr_and_log_it(g_currentY++, 74, "No Imgs"); 2662 if (does_file_exist("/ root/images/mindi/mondorescue.iso")) {2665 if (does_file_exist("/var/cache/mindi/mondorescue.iso")) { 2663 2666 popup_and_OK 2664 ("Boot+data floppy creation failed.\nHowever, you may burn / root/images/mindi/mondorescue.iso to a CD\nand boot from that instead if you wish.");2667 ("Boot+data floppy creation failed.\nHowever, you may burn /var/cache/mindi/mondorescue.iso to a CD\nand boot from that instead if you wish."); 2665 2668 res++; 2666 2669 } 2667 2670 } else { 2668 offer_to_write_floppies(bkpinfo, "/ root/images/mindi");2671 offer_to_write_floppies(bkpinfo, "/var/cache/mindi"); 2669 2672 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 2670 2673 } … … 3004 3007 */ 3005 3008 int 3006 slice_up_file_etc(struct s_bkpinfo *bkpinfo, char *biggie_filename,3009 slice_up_file_etc(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf, char *biggie_filename, 3007 3010 char *ntfsprog_fifo, long biggie_file_number, 3008 3011 long noof_biggie_files, bool use_ntfsprog) … … 3127 3130 bkpinfo->tmpdir, ""), NULL); 3128 3131 } else { 3129 res = move_files_to_cd(bkpinfo, 3130 slice_fname(biggie_file_number, 0, 3131 bkpinfo->tmpdir, ""), NULL); 3132 res = 3133 move_files_to_cd(bkpinfo, mrconf, 3134 slice_fname(biggie_file_number, 0, 3135 bkpinfo->tmpdir, ""), NULL); 3132 3136 } 3133 3137 i = bkpinfo->optimal_set_size / 256; … … 3243 3247 res = move_files_to_stream(bkpinfo, file_to_archive, NULL); 3244 3248 } else { 3245 res = move_files_to_cd(bkpinfo, file_to_archive, NULL);3249 res = move_files_to_cd(bkpinfo, mrconf, file_to_archive, NULL); 3246 3250 } 3247 3251 paranoid_free(file_to_archive); … … 3339 3343 * however, this occurs rarely. 3340 3344 */ 3341 int write_final_iso_if_necessary(struct s_bkpinfo *bkpinfo )3345 int write_final_iso_if_necessary(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf) 3342 3346 { 3343 3347 /*@ int ***************************************************** */ … … 3362 3366 #endif 3363 3367 paranoid_free(tmp); 3364 res = write_iso_and_go_on(bkpinfo, TRUE);3368 res = write_iso_and_go_on(bkpinfo, mrconf, TRUE); 3365 3369 #ifndef _XWIN 3366 3370 if (!g_text_mode) { … … 3390 3394 * @see make_iso_fs 3391 3395 */ 3392 int write_iso_and_go_on(struct s_bkpinfo *bkpinfo, bool last_cd)3396 int write_iso_and_go_on(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf, bool last_cd) 3393 3397 { 3394 3398 /*@ pointers **************************************************** */ … … 3468 3472 g_current_media_number); 3469 3473 for (that_one_was_ok = FALSE; !that_one_was_ok;) { 3470 res = make_iso_fs(bkpinfo, isofile);3474 res = make_iso_fs(bkpinfo, mrconf, isofile); 3471 3475 if (g_current_media_number == 1 && !res 3472 3476 && (bkpinfo->backup_media_type == cdr … … 3753 3757 setenv("MONDO_SHARE", MONDO_SHARE, 1); 3754 3758 } 3759 3760 void mrarchive_init_conf(struct s_mrconf *mrconf) { 3761 char *command = NULL; 3762 FILE *conffd = NULL; 3763 FILE *fin = NULL; 3764 int n = 0; 3765 char *param = NULL; 3766 3767 mrconf = (struct s_mrconf *)malloc(sizeof(struct s_mrconf)); 3768 if (mrconf == NULL) { 3769 fatal_error("Unable to malloc mrconf"); 3770 } 3771 /* Default for everything int : 0 char * : NULL */ 3772 3773 /* mindi conf parameters also needed in mondo */ 3774 mrconf->ia64_boot_size = 0; 3775 3776 asprintf(&command, "mindi -printvar IA64_BOOT_SIZE"); 3777 fin = popen(command, "r"); 3778 getline(¶m, &n, fin); 3779 pclose(fin); 3780 paranoid_free(command); 3781 mrconf->ia64_boot_size = atoi(param); 3782 paranoid_free(param); 3783 3784 mrconf->iso_creation_cmd = NULL; 3785 3786 /* Finds mondo conf file */ 3787 mrconf_open(MONDO_CONF_DIR"/mondo.conf"); 3788 3789 /* mondo conf parameters needed */ 3790 mrconf->iso_creation_cmd = mrconf_sread(iso_creation_cmd); 3791 3792 mrconf_close(); -
trunk/mondo/mondo/common/libmondo-archive.h
r483 r539 17 17 int make_slices_and_images(struct s_bkpinfo *bkpinfo, 18 18 char *biggielist_fname); 19 int make_iso_fs(struct s_bkpinfo *bkpinfo, char *destfile);19 int make_iso_fs(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf, char *destfile); 20 20 int make_afioballs_and_images(struct s_bkpinfo *bkpinfo); 21 21 extern int (*move_files_to_cd) (struct s_bkpinfo *, char *, ...); -
trunk/mondo/mondo/common/libmondo-filelist.c
r507 r539 1536 1536 char *userdef_filelist) 1537 1537 { 1538 char sz_datefile_wildcard[] = "/var/cache/mondo -archive/difflevel.%d";1538 char sz_datefile_wildcard[] = "/var/cache/mondo/difflevel.%d"; 1539 1539 char *p, *q; 1540 1540 char *sz_datefile; … … 1605 1605 asprintf(&exclude_paths, " %s %s %s %s %s %s . .. \ 1606 1606 " MNT_CDROM " " MNT_FLOPPY " /media/cdrom /media/cdrecorder \ 1607 /proc /sys / root/images/mondo /root/images/mindi", excp, call_program_and_get_last_line_of_output("locate /win386.swp 2> /dev/null"), call_program_and_get_last_line_of_output("locate /hiberfil.sys 2> /dev/null"), call_program_and_get_last_line_of_output("locate /pagefile.sys 2> /dev/null"), (tmpdir[0] == '/' && tmpdir[1] == '/') ? (tmpdir + 1) : tmpdir, (scratchdir[0] == '/' && scratchdir[1] == '/') ? (scratchdir + 1) : scratchdir);1607 /proc /sys /tmp /var/cache/mondo /var/cache/mindi", excp, call_program_and_get_last_line_of_output("locate /win386.swp 2> /dev/null"), call_program_and_get_last_line_of_output("locate /hiberfil.sys 2> /dev/null"), call_program_and_get_last_line_of_output("locate /pagefile.sys 2> /dev/null"), (tmpdir[0] == '/' && tmpdir[1] == '/') ? (tmpdir + 1) : tmpdir, (scratchdir[0] == '/' && scratchdir[1] == '/') ? (scratchdir + 1) : scratchdir); 1608 1608 1609 1609 log_msg(2, "Excluding paths = '%s'", exclude_paths); -
trunk/mondo/mondo/common/libmondo-tools.c
r507 r539 737 737 strcpy(bkpinfo->isodir, "/"); 738 738 } else { 739 strcpy(bkpinfo->isodir, "/ root/images/mondo");739 strcpy(bkpinfo->isodir, "/var/cache/mondo/iso"); 740 740 } 741 741 strcpy(bkpinfo->prefix, STD_PREFIX); … … 848 848 #endif 849 849 850 if ((Lres = free_space_on_given_partition("/ root")) == -1){850 if ((Lres = free_space_on_given_partition("/var/cache/mondo")) == -1) /* { 851 851 Lres = free_space_on_given_partition("/"); 852 852 } 853 */ 853 854 log_it("Free space on given partition = %ld MB", Lres); 854 855 855 856 if (Lres < 50) { 856 run_program_and_log_output 857 ("rm -Rf /root/images/mindi; mkdir -p /home/root/images/mindi; mkdir -p /root/images; ln -sf /home/root/images/mindi /root/images/mindi", 858 3); 859 // fatal_error("Your / (or /root) partition has <50MB free. Please adjust your partition table to something saner."); 857 fatal_error("Your /var/cache/mondo partition has <50MB free. Please adjust your partition table to something saner."); 860 858 } 861 859 … … 1216 1214 } 1217 1215 1218 1219 /**1220 * The standard log_debug_msg() (log_msg() also due to a macro). Writes some describing1221 * information to the logfile.1222 */1223 void standard_log_debug_msg(int debug_level, const char *szFile,1224 const char *szFunction, int nLine,1225 const char *fmt, ...)1226 {1227 va_list args;1228 int i;1229 static int depth = 0;1230 FILE *fout;1231 1232 if (depth > 5) {1233 depth--;1234 return;1235 }1236 depth++;1237 1238 if (debug_level <= g_loglevel) {1239 va_start(args, fmt);1240 if (!(fout = fopen(MONDO_LOGFILE, "a"))) {1241 return;1242 } // fatal_error("Failed to openout to logfile - sheesh..."); }1243 1244 // add tabs to distinguish log levels1245 if (debug_level > 0) {1246 for (i = 1; i < debug_level; i++)1247 fprintf(fout, "\t");1248 if (getpid() == g_main_pid)1249 fprintf(fout, "[Main] %s->%s#%d: ", szFile, szFunction,1250 nLine);1251 else if (getpid() == g_buffer_pid && g_buffer_pid > 0)1252 fprintf(fout, "[Buff] %s->%s#%d: ", szFile, szFunction,1253 nLine);1254 else1255 fprintf(fout, "[TH=%d] %s->%s#%d: ", getpid(), szFile,1256 szFunction, nLine);1257 }1258 vfprintf(fout, fmt, args);1259 1260 // do not slow down the progran if standard debug level1261 // must be enabled: if no flush, the log won't be up-to-date if there1262 // is a segfault1263 //if (g_dwDebugLevel != 1)1264 1265 va_end(args);1266 fprintf(fout, "\n");1267 paranoid_fclose(fout);1268 }1269 depth--;1270 }1271 1272 /**1273 * Function pointer to the @c log_debug_msg function to use. Points to standard_log_debug_msg() by default.1274 */1275 void (*log_debug_msg) (int, const char *, const char *, int, const char *,1276 ...) = standard_log_debug_msg;1277 1278 1279 1216 /** 1280 1217 * Allocate or free important globals, depending on @p mal. -
trunk/mondo/mondo/common/mondostructures.h
r518 r539 784 784 struct s_mdrec el[MAXIMUM_RAID_DEVS]; 785 785 }; 786 787 struct s_mrconf { 788 int ia64_boot_size; 789 char *iso_creation_cmd; 790 }; -
trunk/mondo/mondo/common/my-stuff.h
r518 r539 1 /* $Id$ */ 2 1 /* 2 * Common defines across the project 3 * 4 * $Id$ 5 */ 6 7 #ifndef _MY_STUFF_H_ 8 #define _MY_STUFF_H_ 9 10 /* BERLIOS 3 11 #define HAVE_MALLOC 1 12 */ 4 13 5 14 // Extra info for ACLs and SELINUX users … … 26 35 * Create the illusion of a Boolean type. 27 36 */ 28 #define bool int37 #define bool unsigned char 29 38 #define TRUE 1 30 39 #define FALSE 0 … … 34 43 #include <config.h> 35 44 #endif 45 /* BERLIOS 46 * Useful ? 47 */ 36 48 37 49 #ifndef __FreeBSD__ … … 47 59 48 60 #include <stdlib.h> 61 /* BERLIOS 49 62 #ifndef __USE_FILE_OFFSET64 50 63 #define __USE_FILE_OFFSET64 … … 53 66 #define __USE_LARGEFILE64 54 67 #endif 68 */ 55 69 #include <sys/stat.h> 56 70 #include <fcntl.h> … … 64 78 #include <signal.h> 65 79 #endif 66 //#include <curses.h>67 80 #include <newt.h> 68 81 #include <ctype.h> … … 70 83 #ifndef S_SPLINT_S 71 84 #include <pthread.h> 72 #endif73 85 #include <assert.h> 74 86 75 #include "../../config.h" 76 87 /* 77 88 #if defined(DEBUG) && !__cplusplus 78 89 int count; 79 char trace_log[255]; /*buffer for logging */90 char trace_log[255]; 80 91 char *trace_log_ptr; 81 #endif /* DEBUG */82 83 #define IA64_BOOT_SIZE "8192" /* Should be coherent with mindi */ 84 #define STD_PREFIX "mondorescue" /* Should be coherent with mindi */92 #endif 93 */ 94 95 #define STD_PREFIX "mondorescue" 85 96 86 97 /** … … 129 140 #define CRC_M16 0xA001 ///< Mask for crc16. 130 141 #define CRC_MTT 0x1021 ///< Mask for crc-ccitt. 131 132 #define FALSE 0 ///< The ubiquitous FALSE macro.133 #define TRUE 1 ///< The even more ubiquitous TRUE macro.134 142 135 143 #define SCREEN_LENGTH 25 ///< The default size of the screen. -
trunk/mondo/mondo/mondoarchive/main.c
r507 r539 133 133 { 134 134 struct s_bkpinfo *bkpinfo; 135 struct s_mrconf *mrconf; 135 136 char *tmp; 136 137 int res = 0; … … 160 161 malloc_libmondo_global_strings(); 161 162 163 /* Initialize Configuration Structure */ 164 mrarchive_init_conf(mrconf); 165 166 res = 0; 167 retval = 0; 162 168 diffs = 0; 163 169 printf(_("Initializing...\n")); … … 327 333 /* If we're meant to backup then backup */ 328 334 if (bkpinfo->backup_data) { 329 res = backup_data(bkpinfo );335 res = backup_data(bkpinfo, mrconf); 330 336 retval += res; 331 337 if (res) { … … 363 369 } 364 370 365 if (does_file_exist("/ root/images/mindi/mondorescue.iso")) {371 if (does_file_exist("/var/cache/mindi/mondorescue.iso")) { 366 372 log_to_screen 367 (_("/ root/images/mindi/mondorescue.iso, a boot/utility CD, is available if you want it."));373 (_("/var/cache/mindi/mondorescue.iso, a boot/utility CD, is available if you want it.")); 368 374 } 369 375 -
trunk/mondo/mondo/mondorestore/mondo-rstr-newt.c
r507 r539 2294 2294 * @param isodir_device Where to put the device (e.g. /dev/hda4) the user enters. 2295 2295 * @param isodir_format Where to put the format (e.g. ext2) the user enters. 2296 * @param isodir_path Where to put the path (e.g. / root/images/mondo) the user enters.2296 * @param isodir_path Where to put the path (e.g. /var/cache/mondo) the user enters. 2297 2297 * @param nuke_me_please Whether we're planning on nuking or not. 2298 2298 * @return TRUE if OK was pressed, FALSE otherwise. -
trunk/mondo/po/fr.po
r501 r539 1314 1314 #: mondo/mondoarchive/main.c:501 1315 1315 msgid "" 1316 "/ root/images/mindi/mondorescue.iso, a boot/utility CD, is available if you "1316 "/var/cache/mindi/mondorescue.iso, a boot/utility CD, is available if you " 1317 1317 "want it." 1318 1318 msgstr "" 1319 "/ root/images/mindi/mondorescue.iso est un CD de boot/utilitaires à votre "1319 "/var/cache/mindi/mondorescue.iso est un CD de boot/utilitaires à votre " 1320 1320 "disposition" 1321 1321
Note:
See TracChangeset
for help on using the changeset viewer.