Changeset 1769 in MondoRescue for branches/stable/mondo/src/mondorestore
- Timestamp:
- Nov 6, 2007, 1:37:38 AM (16 years ago)
- Location:
- branches/stable/mondo/src/mondorestore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c
r1663 r1769 891 891 } 892 892 893 read_cfg_var(cfg_file, "use-lzo", value); 893 /* BERLIOS: This has now to be re-written with conf file */ 894 read_cfg_var(cfg_file, "use-comp", value); 894 895 if (strstr(value, "yes")) { 895 bkpinfo->use_lzo = TRUE; 896 bkpinfo->use_gzip = FALSE; 897 strcpy(bkpinfo->zip_exe, "lzop"); 898 strcpy(bkpinfo->zip_suffix, "lzo"); 899 } else { 900 read_cfg_var(cfg_file, "use-gzip", value); 901 if (strstr(value, "yes")) { 902 bkpinfo->use_lzo = FALSE; 903 bkpinfo->use_gzip = TRUE; 904 strcpy(bkpinfo->zip_exe, "gzip"); 905 strcpy(bkpinfo->zip_suffix, "gz"); 906 } else { 907 read_cfg_var(cfg_file, "use-comp", value); 908 if (strstr(value, "yes")) { 909 bkpinfo->use_lzo = FALSE; 910 bkpinfo->use_gzip = FALSE; 911 strcpy(bkpinfo->zip_exe, "bzip2"); 912 strcpy(bkpinfo->zip_suffix, "bz2"); 913 } else { 914 bkpinfo->zip_exe[0] = bkpinfo->zip_suffix[0] = '\0'; 915 } 916 } 896 read_cfg_var(cfg_file, "compression_tool", value); 897 mr_asprintf(&(bkpinfo->compression_tool), value); 898 read_cfg_var(cfg_file, "compression_suffix", value); 899 mr_asprintf(&(bkpinfo->compression_suffix), "bz2"); 900 } else { 901 bkpinfo->compression_tool = NULL; 902 bkpinfo->compression_suffix = NULL; 917 903 } 918 904 -
branches/stable/mondo/src/mondorestore/mondorestore.c
r1663 r1769 1294 1294 * @param bkpinfo The backup information structure. Fields used: 1295 1295 * - @c bkpinfo->restore_path 1296 * - @c bkpinfo-> zip_exe1296 * - @c bkpinfo->compression_tool 1297 1297 * @param orig_bf_fname The original filename of the biggiefile. 1298 1298 * @param biggiefile_number The number of the biggiefile (starting from 0). … … 1433 1433 } 1434 1434 1435 if (!bkpinfo-> zip_exe[0]) {1435 if (!bkpinfo->compression_tool) { 1436 1436 mr_asprintf(&command, "cat > \"%s\"", file_to_openout); 1437 1437 } else { 1438 mr_asprintf(&command, "%s -dc > \"%s\" 2>> %s", bkpinfo-> zip_exe,1438 mr_asprintf(&command, "%s -dc > \"%s\" 2>> %s", bkpinfo->compression_tool, 1439 1439 file_to_openout, MONDO_LOGFILE); 1440 1440 } … … 1758 1758 * - @c bkpinfo->backup_media_type 1759 1759 * - @c bkpinfo->media_device 1760 * - @c bkpinfo-> zip_exe1760 * - @c bkpinfo->compression_tool 1761 1761 * @param tarball_fname The filename of the afioball to restore. 1762 1762 * @param current_tarball_number The number (starting from 0) of the fileset … … 1820 1820 mr_asprintf(&executable, " -bz"); 1821 1821 } else { 1822 mr_asprintf(&executable, "-P %s -Z", bkpinfo-> zip_exe);1822 mr_asprintf(&executable, "-P %s -Z", bkpinfo->compression_tool); 1823 1823 } 1824 1824 } … … 2940 2940 } 2941 2941 2942 if (argc >= 2 && strcmp(argv[1], "--pih") == 0) {2943 if (system("mount | grep cdrom 2> /dev/null > /dev/null")) {2944 system("mount " MNT_CDROM);2945 }2946 bkpinfo->compression_level = 1;2947 g_current_media_number = 2;2948 strcpy(bkpinfo->restore_path, "/tmp/TESTING");2949 bkpinfo->backup_media_type = dvd;2950 open_progress_form(_("Reassembling /dev/hda1"),2951 _("Shark is a bit of a silly person."),2952 _("Please wait. This may take some time."),2953 "", 1999);2954 system("rm -Rf /tmp/*pih*");2955 2956 malloc_string(tmp);2957 restore_a_biggiefile_from_CD(42, NULL, tmp);2958 mr_free(tmp);2959 }2960 2961 2942 if (argc == 5 && strcmp(argv[1], "--common") == 0) { 2962 2943 mr_conf->log_level = 6;
Note:
See TracChangeset
for help on using the changeset viewer.