Changeset 1817 in MondoRescue
- Timestamp:
- Nov 20, 2007, 3:36:00 PM (17 years ago)
- Location:
- branches/stable/mondo
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/distributions/conf/mondo.conf.dist
r1769 r1817 97 97 mondo_boot_loader="NATIVE" 98 98 99 # DONE100 99 # 101 100 # Default compression tool … … 115 114 mondo_compression_level=6 116 115 117 # IN PROGRESS118 119 116 # 120 117 # Paths to exclude from backup … … 123 120 mondo_exclude_paths="" 124 121 122 # DONE 123 124 # IN PROGRESS 125 125 # 126 126 # Paths to include onto the backup -
branches/stable/mondo/src/common/libmondo-devices.c
r1770 r1817 1555 1555 char *tmp = NULL; 1556 1556 char *tmp1 = NULL; 1557 char *tmp2 = NULL; 1557 1558 char *sz_size = NULL; 1558 1559 char *command = NULL; … … 1699 1700 bkpinfo->media_device); 1700 1701 } else { 1701 <<<<<<< .courant 1702 mr_asprintf(&comment, _("What is your media device ?")); 1702 if (bkpinfo->backup_media_type == usb) { 1703 mr_asprintf(&comment, _("What is the /dev entry of your USB Disk/Key, please ?")); 1704 } else { 1705 mr_asprintf(&comment, _("What is your media device ?")); 1706 } 1703 1707 mr_asprintf(&tmp, mr_conf->media_device); 1704 1708 … … 1706 1710 log_to_screen(_("User has chosen not to backup the PC")); 1707 1711 finish(1); 1708 ======= 1709 if ((find_cdrw_device(bkpinfo->media_device)) && (bkpinfo->backup_media_type != usb)) { 1710 bkpinfo->media_device[0] = '\0'; 1711 >>>>>>> .fusion-droit.r1769 1712 } 1713 <<<<<<< .courant 1712 } 1714 1713 mr_free(comment); 1715 1714 … … 1725 1724 if (!popup_and_get_string("Device", comment, tmp, 5)) { 1726 1725 log_to_screen(_("User has chosen not to backup the PC")); 1727 =======1728 if (bkpinfo->media_device[0]) {1729 if (bkpinfo->backup_media_type == usb) {1730 sprintf(tmp,1731 "I think your %s media corresponds to %s. Is this correct?",1732 media_descriptor_string(bkpinfo->backup_media_type),1733 bkpinfo->media_device);1734 } else {1735 sprintf(tmp,1736 "I think I've found your %s burner at SCSI node %s. Is this correct? (Say no if you have an IDE burner and you are running a 2.6 kernel. You will then be prompted for further details.)",1737 media_descriptor_string(bkpinfo->backup_media_type),1738 bkpinfo->media_device);1739 }1740 if (!ask_me_yes_or_no(tmp)) {1741 bkpinfo->media_device[0] = '\0';1742 }1743 }1744 if (!bkpinfo->media_device[0]) {1745 if (bkpinfo->backup_media_type == usb) {1746 i = popup_and_get_string("/dev entry?",1747 "What is the /dev entry of your USB Disk/Key, please?",1748 bkpinfo->media_device,1749 MAX_STR_LEN / 4);1750 } else {1751 if (g_kernel_version < 2.6) {1752 i = popup_and_get_string("Device node?",1753 "What is the SCSI node of your CD (re)writer, please?",1754 bkpinfo->media_device,1755 MAX_STR_LEN / 4);1756 } else {1757 i = popup_and_get_string("/dev entry?",1758 "What is the /dev entry of your CD (re)writer, please?",1759 bkpinfo->media_device,1760 MAX_STR_LEN / 4);1761 }1762 }1763 if (!i) {1764 log_to_screen("User has chosen not to backup the PC");1765 >>>>>>> .fusion-droit.r17691766 1726 finish(1); 1767 1727 } … … 2106 2066 mr_asprintf(&tmp, list_of_NFS_mounts_only()); 2107 2067 if (strlen(tmp) > 2) { 2108 if (bkpinfo->exclude_paths [0]) {2109 strcat(bkpinfo->exclude_paths, " ");2110 } 2111 strncpy(bkpinfo->exclude_paths, tmp, MAX_STR_LEN);2068 if (bkpinfo->exclude_paths != NULL) { 2069 mr_strcat(bkpinfo->exclude_paths, " "); 2070 } 2071 mr_strcat(bkpinfo->exclude_paths,tmp); 2112 2072 } 2113 2073 mr_free(tmp); -
branches/stable/mondo/src/common/libmondo-filelist.c
r1770 r1817 1529 1529 1530 1530 malloc_string(sz_datefile); 1531 if (!(exclude_paths = malloc(8*MAX_STR_LEN))) {1532 fatal_error("Cannot malloc exclude_paths");1533 }1534 1531 malloc_string(g_skeleton_filelist); 1535 1532 // The pathname to the skeleton filelist, used to give better progress reporting for mondo_makefilelist(). … … 1589 1586 mr_msg(2, "include_paths = '%s'", include_paths); 1590 1587 mr_msg(1, "Calculating filelist"); 1591 snprintf(exclude_paths, (size_t)8*MAX_STR_LEN," %s %s %s %s %s %s %s . .. \1588 mr_asprintf(&exclude_paths, " %s %s %s %s %s %s %s . .. \ 1592 1589 " MNT_CDROM " /mnt/floppy /media \ 1593 1590 /proc /sys /tmp /var/log/lastlog /root/images/mondo " MINDI_CACHE " " MONDO_CACHE, 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); -
branches/stable/mondo/src/common/libmondo-tools.c
r1770 r1817 770 770 bkpinfo->backup_media_string[0] = '\0'; 771 771 strcpy(bkpinfo->include_paths, "/"); 772 bkpinfo->exclude_paths[0] = '\0';773 772 bkpinfo->call_before_iso[0] = '\0'; 774 773 bkpinfo->call_make_iso[0] = '\0'; -
branches/stable/mondo/src/common/mondostructures.h
r1769 r1817 497 497 * the scratchdir, and the tempdir are automatically excluded. 498 498 */ 499 char exclude_paths[MAX_STR_LEN*4];499 char *exclude_paths; 500 500 501 501 /** -
branches/stable/mondo/src/mondoarchive/mondo-cli.c
r1770 r1817 506 506 507 507 if (flag_set['E']) { 508 if (bkpinfo->exclude_paths [0]) {509 strcat(bkpinfo->exclude_paths, " ");508 if (bkpinfo->exclude_paths != NULL) { 509 mr_strcat(bkpinfo->exclude_paths, " "); 510 510 } 511 511 mr_asprintf(&tmp1, flag_val['E']); … … 538 538 } 539 539 mr_free(tmp1); 540 541 strncpy(bkpinfo->exclude_paths + strlen(bkpinfo->exclude_paths), 542 flag_val['E'], 543 4*MAX_STR_LEN - strlen(bkpinfo->exclude_paths)); 540 mr_strcat(bkpinfo->exclude_paths, flag_val['E']); 544 541 } 545 542 if (flag_set['e']) { … … 549 546 { 550 547 mr_asprintf(&psz, list_of_NFS_mounts_only()); 551 if (bkpinfo->exclude_paths [0]) {552 strncat(bkpinfo->exclude_paths, " ", 4*MAX_STR_LEN);553 } 554 strncat(bkpinfo->exclude_paths, psz, 4*MAX_STR_LEN);548 if (bkpinfo->exclude_paths != NULL) { 549 mr_strcat(bkpinfo->exclude_paths, " "); 550 } 551 mr_strcat(bkpinfo->exclude_paths, psz); 555 552 mr_free(psz); 556 553 mr_msg(3, "-N means we're now excluding %s", 557 554 bkpinfo->exclude_paths); 558 }559 if (strlen(bkpinfo->exclude_paths) >= 4*MAX_STR_LEN) {560 fatal_error561 ("Your '-E' parameter is too long. Increase MAX_STR_LEN");562 555 } 563 556 if (flag_set['b']) {
Note:
See TracChangeset
for help on using the changeset viewer.