Changeset 538 in MondoRescue for branches/stable/mondo
- Timestamp:
- May 13, 2006, 6:39:55 PM (19 years ago)
- Location:
- branches/stable/mondo
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/distributions/conf/mondo.conf
r532 r538 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" -
branches/stable/mondo/mondo/common/Makefile.am
r501 r538 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 \ -
branches/stable/mondo/mondo/common/libmondo-archive-EXT.h
r482 r538 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 *, ...); -
branches/stable/mondo/mondo/common/libmondo-archive.c
r501 r538 580 580 * @ingroup archiveGroup 581 581 */ 582 int backup_data(struct s_bkpinfo *bkpinfo )582 int backup_data(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf) 583 583 { 584 584 int retval = 0, res = 0; … … 643 643 sprintf(tmp, "rm -f %s/images/*.iso", bkpinfo->scratchdir); 644 644 run_program_and_log_output(tmp, 1); 645 retval += make_those_afios_phase(bkpinfo ); // backup regular files645 retval += make_those_afios_phase(bkpinfo,mrconf); // backup regular files 646 646 retval += make_those_slices_phase(bkpinfo); // backup BIG files 647 647 retval += do_that_final_phase(bkpinfo); // clean up … … 1014 1014 if (!res) { 1015 1015 log_to_screen("Boot+data disks were created OK"); 1016 sprintf(command, "mkdir -p / root/images/mindi/");1016 sprintf(command, "mkdir -p /var/cache/mindi/"); 1017 1017 log_msg(2, command); 1018 1018 run_program_and_log_output(command, FALSE); 1019 1019 sprintf(command, 1020 "cp -f %s/images/mindi.iso / root/images/mindi/mondorescue.iso",1020 "cp -f %s/images/mindi.iso /var/cache/mindi/mondorescue.iso", 1021 1021 bkpinfo->scratchdir); 1022 1022 log_msg(2, command); … … 1252 1252 * @ingroup MLarchiveGroup 1253 1253 */ 1254 int do_that_final_phase(struct s_bkpinfo *bkpinfo )1254 int do_that_final_phase(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf) 1255 1255 { 1256 1256 … … 1273 1273 /* write final ISO */ 1274 1274 { 1275 res = write_final_iso_if_necessary(bkpinfo );1275 res = write_final_iso_if_necessary(bkpinfo, mrconf); 1276 1276 retval += res; 1277 1277 if (res) { … … 1563 1563 * @return The number of errors encountered (0 for success) 1564 1564 */ 1565 int make_afioballs_and_images(struct s_bkpinfo *bkpinfo )1565 int make_afioballs_and_images(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf) 1566 1566 { 1567 1567 … … 1707 1707 } else { 1708 1708 res = 1709 move_files_to_cd(bkpinfo, storing_filelist_fname,1709 move_files_to_cd(bkpinfo, mrconf, storing_filelist_fname, 1710 1710 curr_xattr_list_fname, 1711 1711 curr_acl_list_fname, … … 1785 1785 * @return The number of errors encountered (0 for success) 1786 1786 */ 1787 int make_iso_fs(struct s_bkpinfo *bkpinfo, char *destfile)1787 int make_iso_fs(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf, char *destfile) 1788 1788 { 1789 1789 /*@ int ********************************************** */ … … 2005 2005 #ifdef __IA64__ 2006 2006 log_msg(1, "IA64 --> elilo"); 2007 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); 2007 2008 res = eval_call_to_make_ISO(bkpinfo, 2008 2009 //-b images/mindi-boot.2880.img 2009 "mkisofs -no-emul-boot -b images/mindi-bootroot." 2010 IA64_BOOT_SIZE 2011 ".img -c boot.cat -o _ISO_ -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", 2010 tmp2, 2012 2011 destfile, 2013 2012 g_current_media_number, … … 2017 2016 // FIXME --- change mkisofs string to MONDO_MKISOFS_REGULAR_SYSLINUX/LILO depending on bkpinfo->make_cd_usE_lilo 2018 2017 // and add ' .' at end 2018 paranoid_free(tmp2); 2019 2019 log_msg(1, "Non-ia64 --> lilo"); 2020 2020 res = … … 2150 2150 */ 2151 2151 int 2152 make_slices_and_images(struct s_bkpinfo *bkpinfo, char *biggielist_fname)2152 make_slices_and_images(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf, char *biggielist_fname) 2153 2153 { 2154 2154 … … 2223 2223 } else { 2224 2224 // Call ntfsclone (formerly partimagehack) if it's a /dev entry (i.e. a partition to be imaged) 2225 log_msg(2, "bigfile_fname = %s", bigfile_fname);2225 log_msg(2, "bigfile_fname = '%s'", bigfile_fname); 2226 2226 use_ntfsprog = FALSE; 2227 2227 if (!strncmp(bigfile_fname, "/dev/", 5) … … 2269 2269 } 2270 2270 res = 2271 slice_up_file_etc(bkpinfo, bigfile_fname,2271 slice_up_file_etc(bkpinfo, mrconf, bigfile_fname, 2272 2272 ntfsprog_fifo, biggie_file_number, 2273 2273 noof_biggie_files, use_ntfsprog); … … 2321 2321 * @see make_afioballs_and_images 2322 2322 */ 2323 int make_afioballs_and_images_OLD(struct s_bkpinfo *bkpinfo )2323 int make_afioballs_and_images_OLD(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf) 2324 2324 { 2325 2325 … … 2403 2403 } else { 2404 2404 res = 2405 move_files_to_cd(bkpinfo, curr_filelist_fname,2405 move_files_to_cd(bkpinfo, mrconf, curr_filelist_fname, 2406 2406 curr_xattr_list_fname, 2407 2407 curr_acl_list_fname, curr_afioball_fname, … … 2448 2448 * @ingroup MLarchiveGroup 2449 2449 */ 2450 int make_those_afios_phase(struct s_bkpinfo *bkpinfo )2450 int make_those_afios_phase(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf) 2451 2451 { 2452 2452 /*@ int ******************************************* */ … … 2465 2465 log_msg(1, 2466 2466 "Using single-threaded make_afioballs_and_images() to suit b0rken FreeBSD 5.0"); 2467 res = make_afioballs_and_images_OLD(bkpinfo );2467 res = make_afioballs_and_images_OLD(bkpinfo, mrconf); 2468 2468 #else 2469 res = make_afioballs_and_images_OLD(bkpinfo );2469 res = make_afioballs_and_images_OLD(bkpinfo, mrconf); 2470 2470 #endif 2471 2471 write_header_block_to_stream(0, "stop-afioballs", 2472 2472 BLK_STOP_AFIOBALLS); 2473 2473 } else { 2474 res = make_afioballs_and_images(bkpinfo );2474 res = make_afioballs_and_images(bkpinfo, mrconf); 2475 2475 } 2476 2476 … … 2575 2575 * transfer files over the network) or leave it as is. 2576 2576 */ 2577 int (*move_files_to_cd) (struct s_bkpinfo *, char *, ...) =2577 int (*move_files_to_cd) (struct s_bkpinfo *, struct s_mrconf *mrconf, char *, ...) = 2578 2578 _move_files_to_cd; 2579 2579 … … 2596 2596 * @return The number of errors encountered (0 for success) 2597 2597 */ 2598 int _move_files_to_cd(struct s_bkpinfo *bkpinfo, char *files_to_add, ...)2598 int _move_files_to_cd(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf, char *files_to_add, ...) 2599 2599 { 2600 2600 … … 2635 2635 } 2636 2636 if (would_occupy / 1024 > bkpinfo->media_size[g_current_media_number]) { 2637 res = write_iso_and_go_on(bkpinfo, FALSE); /* FALSE because this is not the last CD we'll write */2637 res = write_iso_and_go_on(bkpinfo, struct s_mrconf *mrconf, FALSE); /* FALSE because this is not the last CD we'll write */ 2638 2638 retval += res; 2639 2639 if (res) { … … 2685 2685 * @c backup_media_type field is used in this function. 2686 2686 * @param imagesdir The directory containing the floppy images (usually 2687 * / root/images/mindi).2687 * /var/cache/mindi). 2688 2688 * 2689 2689 * @return The number of errors encountered (0 for success) … … 2864 2864 if (!bkpinfo->nonbootable_backup) { 2865 2865 #ifdef __FreeBSD__ 2866 if (!does_file_exist("/ root/images/mindi/mindi-kern.1722.img"))2866 if (!does_file_exist("/var/cache/mindi/mindi-kern.1722.img")) 2867 2867 #else 2868 if (!does_file_exist("/root/images/mindi/mindi-bootroot.1722.img") 2869 && !does_file_exist("/root/images/mindi/mindi-boot.1440.img")) 2868 if (!does_file_exist("/var/cache/mindi/mindi-bootroot.1722.img") 2869 && !does_file_exist("/var/cache/mindi/mindi-boot.1440.img") 2870 && !does_file_exist("/var/cache/mindi/mindi-boot.2880.img") 2871 && !does_file_exist("/var/cache/mindi/mindi-boot.5760.img")) 2870 2872 #endif 2871 2873 { 2872 2874 mvaddstr_and_log_it(g_currentY++, 74, "No Imgs"); 2873 if (does_file_exist("/ root/images/mindi/mondorescue.iso")) {2875 if (does_file_exist("/var/cache/mindi/mondorescue.iso")) { 2874 2876 popup_and_OK 2875 ("Boot+data floppy creation failed. However, FYI, you may burn / root/images/mindi/mondorescue.iso to a CD and boot from that instead if you wish.");2877 ("Boot+data floppy creation failed. However, FYI, you may burn /var/cache/mindi/mondorescue.iso to a CD and boot from that instead if you wish."); 2876 2878 res++; 2877 2879 } 2878 2880 } else { 2879 offer_to_write_floppies(bkpinfo, "/ root/images/mindi");2881 offer_to_write_floppies(bkpinfo, "/var/cache/mindi"); 2880 2882 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 2881 2883 } … … 3277 3279 */ 3278 3280 int 3279 slice_up_file_etc(struct s_bkpinfo *bkpinfo, char *biggie_filename,3281 slice_up_file_etc(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf, char *biggie_filename, 3280 3282 char *ntfsprog_fifo, long biggie_file_number, 3281 3283 long noof_biggie_files, bool use_ntfsprog) … … 3407 3409 } else { 3408 3410 res = 3409 move_files_to_cd(bkpinfo, 3411 move_files_to_cd(bkpinfo, mrconf, 3410 3412 slice_fname(biggie_file_number, 0, 3411 3413 bkpinfo->tmpdir, ""), NULL); … … 3509 3511 res = move_files_to_stream(bkpinfo, file_to_archive, NULL); 3510 3512 } else { 3511 res = move_files_to_cd(bkpinfo, file_to_archive, NULL);3513 res = move_files_to_cd(bkpinfo, mrconf, file_to_archive, NULL); 3512 3514 } 3513 3515 retval += res; … … 3601 3603 * however, this occurs rarely. 3602 3604 */ 3603 int write_final_iso_if_necessary(struct s_bkpinfo *bkpinfo )3605 int write_final_iso_if_necessary(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf) 3604 3606 { 3605 3607 /*@ int ***************************************************** */ … … 3622 3624 } 3623 3625 #endif 3624 res = write_iso_and_go_on(bkpinfo, TRUE);3626 res = write_iso_and_go_on(bkpinfo, struct s_mrconf *mrconf, TRUE); 3625 3627 #ifndef _XWIN 3626 3628 if (!g_text_mode) { … … 3651 3653 * @see make_iso_fs 3652 3654 */ 3653 int write_iso_and_go_on(struct s_bkpinfo *bkpinfo, bool last_cd)3655 int write_iso_and_go_on(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf, bool last_cd) 3654 3656 { 3655 3657 /*@ pointers **************************************************** */ … … 3727 3729 g_current_media_number); 3728 3730 for (that_one_was_ok = FALSE; !that_one_was_ok;) { 3729 res = make_iso_fs(bkpinfo, isofile);3731 res = make_iso_fs(bkpinfo, mrconf, isofile); 3730 3732 if (g_current_media_number == 1 && !res 3731 3733 && (bkpinfo->backup_media_type == cdr … … 4029 4031 setenv("MONDO_SHARE", MONDO_SHARE, 1); 4030 4032 } 4033 4034 void mrarchive_init_conf(struct s_mrconf *mrconf) { 4035 char *command = NULL; 4036 FILE *conffd = NULL; 4037 FILE *fin = NULL; 4038 int n = 0; 4039 char *param = NULL; 4040 4041 mrconf = (struct s_mrconf *)malloc(sizeof(struct s_mrconf)); 4042 if (mrconf == NULL) { 4043 fatal_error("Unable to malloc mrconf"); 4044 } 4045 /* Default for everything int : 0 char * : NULL */ 4046 4047 /* mindi conf parameters also needed in mondo */ 4048 mrconf->ia64_boot_size = 0; 4049 4050 asprintf(&command, "mindi -printvar IA64_BOOT_SIZE"); 4051 fin = popen(command, "r"); 4052 getline(¶m, &n, fin); 4053 pclose(fin); 4054 paranoid_free(command); 4055 mrconf->ia64_boot_size = atoi(param); 4056 paranoid_free(param); 4057 4058 mrconf->iso_creation_cmd = NULL; 4059 4060 /* Finds mondo conf file */ 4061 mrconf_open(MONDO_CONF_DIR"/mondo.conf"); 4062 4063 /* mondo conf parameters needed */ 4064 mrconf->iso_creation_cmd = mrconf_sread(iso_creation_cmd); 4065 4066 mrconf_close(); -
branches/stable/mondo/mondo/common/libmondo-archive.h
r482 r538 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 *, ...); -
branches/stable/mondo/mondo/common/libmondo-filelist.c
r501 r538 1705 1705 char *userdef_filelist) 1706 1706 { 1707 char sz_datefile_wildcard[] = "/var/cache/mondo -archive/difflevel.%d";1707 char sz_datefile_wildcard[] = "/var/cache/mondo/difflevel.%d"; 1708 1708 char *p, *q; 1709 1709 char sz_datefile[80]; … … 1774 1774 sprintf(exclude_paths, " %s %s %s %s %s %s . .. \ 1775 1775 " MNT_CDROM " " MNT_FLOPPY " /media/cdrom /media/cdrecorder \ 1776 /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);1776 /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); 1777 1777 1778 1778 log_msg(2, "Excluding paths = '%s'", exclude_paths); -
branches/stable/mondo/mondo/common/libmondo-tools.c
r501 r538 472 472 #endif 473 473 } 474 475 476 /**477 * Log a trace message to the trace file.478 * @bug This function seems orphaned. Please remove.479 */480 void log_trace(char *o)481 {482 /*@ pointers **************************************************** */483 FILE *fout;484 485 /*@ buffers ***************************************************** */486 char output[MAX_STR_LEN];487 488 /*@ int ****************************************************** */489 int i;490 491 /*@ end vars *************************************************** */492 493 if (o[0] == '\0') {494 return;495 }496 strcpy(output, o);497 i = (int) strlen(output);498 if (i <= 0) {499 return;500 }501 if (output[i - 1] < 32) {502 output[i - 1] = '\0';503 }504 if (g_text_mode505 /* && !strstr(last_line_of_file(MONDO_LOGFILE),output) */ ) {506 printf("%s\n", output);507 }508 509 fout = fopen(MONDO_TRACEFILE, "a");510 if (fout) {511 fprintf(fout, "%s\n", output);512 paranoid_fclose(fout);513 } else {514 log_OS_error("Cannot write to tracefile");515 }516 }517 518 519 520 474 521 475 … … 969 923 strcpy(bkpinfo->isodir, "/"); 970 924 } else { 971 strcpy(bkpinfo->isodir, "/ root/images/mondo");925 strcpy(bkpinfo->isodir, "/var/cache/mondo/iso"); 972 926 } 973 927 strcpy(bkpinfo->prefix, STD_PREFIX); … … 1076 1030 #endif 1077 1031 1078 if ((Lres = free_space_on_given_partition("/ root")) == -1){1032 if ((Lres = free_space_on_given_partition("/var/cache/mondo")) == -1) /* { 1079 1033 Lres = free_space_on_given_partition("/"); 1080 1034 } 1035 */ 1081 1036 log_it("Free space on given partition = %ld MB", Lres); 1082 1037 1083 1038 if (Lres < 50) { 1084 run_program_and_log_output 1085 ("rm -Rf /root/images/mindi; mkdir -p /home/root/images/mindi; mkdir -p /root/images; ln -sf /home/root/images/mindi /root/images/mindi", 1086 3); 1087 // fatal_error("Your / (or /root) partition has <50MB free. Please adjust your partition table to something saner."); 1039 fatal_error("Your /var/cache/mondo partition has <50MB free. Please adjust your partition table to something saner."); 1088 1040 } 1089 1041 … … 1491 1443 } 1492 1444 1493 1494 /**1495 * The standard log_debug_msg() (log_msg() also due to a macro). Writes some describing1496 * information to the logfile.1497 */1498 void standard_log_debug_msg(int debug_level, const char *szFile,1499 const char *szFunction, int nLine,1500 const char *fmt, ...)1501 {1502 va_list args;1503 int i;1504 static int depth = 0;1505 char *tmp;1506 FILE *fout;1507 1508 if (depth > 5) {1509 depth--;1510 return;1511 }1512 depth++;1513 1514 malloc_string(tmp);1515 1516 if (debug_level <= g_loglevel) {1517 va_start(args, fmt);1518 if (!(fout = fopen(MONDO_LOGFILE, "a"))) {1519 return;1520 } // fatal_error("Failed to openout to logfile - sheesh..."); }1521 1522 // add tabs to distinguish log levels1523 if (debug_level > 0) {1524 for (i = 1; i < debug_level; i++)1525 fprintf(fout, "\t");1526 if (getpid() == g_main_pid)1527 fprintf(fout, "[Main] %s->%s#%d: ", szFile, szFunction,1528 nLine);1529 else if (getpid() == g_buffer_pid && g_buffer_pid > 0)1530 fprintf(fout, "[Buff] %s->%s#%d: ", szFile, szFunction,1531 nLine);1532 else1533 fprintf(fout, "[TH=%d] %s->%s#%d: ", getpid(), szFile,1534 szFunction, nLine);1535 }1536 vfprintf(fout, fmt, args);1537 1538 // do not slow down the progran if standard debug level1539 // must be enabled: if no flush, the log won't be up-to-date if there1540 // is a segfault1541 //if (g_dwDebugLevel != 1)1542 1543 va_end(args);1544 fprintf(fout, "\n");1545 paranoid_fclose(fout);1546 }1547 depth--;1548 paranoid_free(tmp);1549 }1550 1551 /**1552 * Function pointer to the @c log_debug_msg function to use. Points to standard_log_debug_msg() by default.1553 */1554 void (*log_debug_msg) (int, const char *, const char *, int, const char *,1555 ...) = standard_log_debug_msg;1556 1557 1558 1445 /** 1559 1446 * If @p y, malloc @p x, else free @p x. … … 1585 1472 paranoid_free(g_magicdev_command); 1586 1473 } 1587 1588 /*1589 char**list_of_arrays[] = {1590 &g_boot_mountpt,1591 &g_mondo_home,1592 &g_tmpfs_mountpt,1593 &g_erase_tmpdir_and_scratchdir,1594 &g_serial_string,1595 &g_magicdev_command,1596 NULL};1597 1598 char**ppcurr;1599 int i;1600 1601 for(i=0;list_of_arrays[i];i++)1602 {1603 log_msg(5, "Allocating %d", i);1604 ppcurr = list_of_arrays[i];1605 if (mal)1606 { *ppcurr = malloc(MAX_STR_LEN); }1607 else1608 {1609 if (*ppcurr)1610 {1611 free(*ppcurr);1612 }1613 }1614 }1615 log_msg(5, "Returning");1616 */1617 1474 } 1618 1475 -
branches/stable/mondo/mondo/common/mondostructures.h
r514 r538 801 801 struct s_mdrec el[MAXIMUM_RAID_DEVS]; 802 802 }; 803 804 struct s_mrconf { 805 int ia64_boot_size; 806 char *iso_creation_cmd; 807 }; -
branches/stable/mondo/mondo/common/my-stuff.h
r511 r538 1 /* my-stuff.h 2 $Id$ 3 . 4 5 6 07/14 7 - ARCH_THREADS is now 2; buffers, 4 8 9 07/10 10 - added acl, xattr stuff 11 12 06/19 13 - added AUX_VER 14 15 06/14 16 - added DO_MBR_PLEASE 17 18 04/17 19 - replaced INTERNAL_TAPE_BLK_SIZE with g_internal_tape_block_size 20 and DEFAULT_INTERNAL_TAPE_BLOCK_SIZE 21 22 04/13 23 - log_msg is now calling standard_log_debug_msg, not the alias (log_debug_msg) 24 25 04/03/2004 26 - added star and SELINUX support 27 28 11/20/2003 29 - boot from isolinux.bin, not mindi-boot.2880.img 30 31 11/15 32 - reduced SLICE_SIZE from 8192 to 4096 33 34 10/08 35 - set p-i-h volsize to 1GB 36 37 10/21 38 - added MNT_CDROM and FREELOADER 39 40 10/11 41 - added DEFAULT_DVD_DISK_SIZE 42 - added PARTIMAGE_DEBUG_LEVEL 43 44 09/27 45 - better logging 46 47 09/24 48 - added MR_LOGFILE="/tmp/mondo-restore.log" 49 50 09/22 51 - added bool, FALSE, TRUE 52 53 09/20 54 - increasd PPCFG_RAMDISK_SIZE to 150 55 56 09/12 57 - reduced MAX_STR_LEN from 512 to 460 58 59 09/10 60 - moved PPCFG_RAMDISK_SIZE here 61 62 09/05 63 - better config.h stuff 64 65 06/05 66 - changed fgrep to grep 67 68 05/19 69 - added CP_BIN 70 71 05/05 72 - added #include <sys/param.h> and sys/sem.h and ioctl.h 73 74 05/03 75 - added kill_anything_like_this() 76 77 04/24/2003 78 - added *STUB #define's 79 80 11/22/2002 81 - added INTERNAL_TAPE_BLK_SIZE 82 83 10/10 84 - use #define to create XMondo-friendly log file name if appropriate 85 86 08/30 87 - changed ARBITRARY_MAXIMUM to 512 88 89 08/26 90 - set MAX_STR_LEN at 512 but halved it within many _structures_ 91 - changed ARBITRARY_MAXIMUM to 128 92 93 08/08 94 - added '#include <signal.h>' 95 - added WELCOME_STRING 96 97 06/19 98 - changed tape block size from 8192 to 65536 99 100 04/08 101 - added manual_cd_tray flag to bkpinfo 102 103 03/31 104 - added restore_path to struct s_bkpinfo 105 106 03/21 107 - updated version# to 1.42 108 109 02/20 110 - added bkpinfo->using_cdstream 111 112 02/06 113 - added MONDO_VERSION 114 115 02/02 116 - added MONDO_CFG_FILE 117 - added SLICE_SIZE 118 119 01/31 120 - removed MINDI_HOME: it is unnecessary 121 - replaced MONDO_HOME with variable g_mondo_home 122 123 01/25 124 - added MONDO_HOME, MINDI_HOME 125 126 01/21 127 - added s_node{} structure 128 129 01/17 130 - added sys/shm.h, types.h, ipc.h 131 132 01/02/2002 133 - added that groovy bkpinfo{} stuff 134 135 11/29/2001 136 - added raidlist{} struct 137 138 08/27 139 - stuff 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 11 #define HAVE_MALLOC 1 140 12 */ 141 142 #define HAVE_MALLOC 1143 144 13 145 14 // Extra info for ACLs and SELINUX users … … 158 27 * Create the illusion of a Boolean type. 159 28 */ 160 #define bool int29 #define bool unsigned char 161 30 #define TRUE 1 162 31 #define FALSE 0 163 32 #endif 164 33 165 #ifndef _MY_STUFF_H_ 166 #define _MY_STUFF_H_ 167 34 /* BERLIOS 168 35 #ifdef HAVE_CONFIG_H 169 36 #include <config.h> 170 37 #endif 38 */ 171 39 172 40 #ifndef __FreeBSD__ … … 181 49 #include <stdio.h> 182 50 #include <stdlib.h> 51 /* BERLIOS 183 52 #ifndef __USE_FILE_OFFSET64 184 53 #define __USE_FILE_OFFSET64 … … 187 56 #define __USE_LARGEFILE64 188 57 #endif 58 */ 189 59 #include <sys/stat.h> 190 60 #include <fcntl.h> … … 196 66 #include <unistd.h> 197 67 #include <signal.h> 198 //#include <curses.h>199 68 #include <newt.h> 200 69 #include <ctype.h> … … 203 72 #include <assert.h> 204 73 205 #include "../../config.h" 206 74 /* 207 75 #if defined(DEBUG) && !__cplusplus 208 76 int count; 209 char trace_log[255]; /*buffer for logging */77 char trace_log[255]; 210 78 char *trace_log_ptr; 211 #endif /* DEBUG */212 213 #define IA64_BOOT_SIZE "8192" /* Should be coherent with mindi */ 214 #define STD_PREFIX "mondorescue" /* Should be coherent with mindi */79 #endif 80 */ 81 82 #define STD_PREFIX "mondorescue" 215 83 216 84 /** … … 255 123 #define CRC_M16 0xA001 ///< Mask for crc16. 256 124 #define CRC_MTT 0x1021 ///< Mask for crc-ccitt. 257 258 #define FALSE 0 ///< The ubiquitous FALSE macro.259 #define TRUE 1 ///< The even more ubiquitous TRUE macro.260 125 261 126 #define SCREEN_LENGTH 25 ///< The default size of the screen. -
branches/stable/mondo/mondo/mondoarchive/main.c
r497 r538 247 247 { 248 248 struct s_bkpinfo *bkpinfo; 249 struct s_mrconf *mrconf; 249 250 char *tmp; 250 251 int res, retval; … … 275 276 malloc_string(say_at_end); 276 277 278 /* Initialize Configuration Structure */ 279 mrarchive_init_conf(mrconf); 280 277 281 res = 0; 278 282 retval = 0; … … 457 461 finish(0); 458 462 */ 459 res = backup_data(bkpinfo );463 res = backup_data(bkpinfo, mrconf); 460 464 retval += res; 461 465 if (res) { … … 497 501 } 498 502 499 if (does_file_exist("/ root/images/mindi/mondorescue.iso")) {503 if (does_file_exist("/var/cache/mindi/mondorescue.iso")) { 500 504 log_to_screen 501 (_("/ root/images/mindi/mondorescue.iso, a boot/utility CD, is available if you want it."));505 (_("/var/cache/mindi/mondorescue.iso, a boot/utility CD, is available if you want it.")); 502 506 } 503 507 -
branches/stable/mondo/mondo/mondoarchive/mondo-cli.c
r520 r538 247 247 flag_set[i] = FALSE; 248 248 } 249 // strcpy (bkpinfo->tmpdir, "/root/images/mondo");250 // strcpy (bkpinfo->scratchdir, "/home");251 249 for (j = 1; j <= MAX_NOOF_MEDIA; j++) { 252 250 bkpinfo->media_size[j] = 650; -
branches/stable/mondo/mondo/mondorestore/mondo-rstr-newt.c
r497 r538 2328 2328 * @param isodir_device Where to put the device (e.g. /dev/hda4) the user enters. 2329 2329 * @param isodir_format Where to put the format (e.g. ext2) the user enters. 2330 * @param isodir_path Where to put the path (e.g. / root/images/mondo) the user enters.2330 * @param isodir_path Where to put the path (e.g. /var/cache/mondo) the user enters. 2331 2331 * @param nuke_me_please Whether we're planning on nuking or not. 2332 2332 * @return TRUE if OK was pressed, FALSE otherwise. -
branches/stable/mondo/po/fr.po
r501 r538 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.