Ignore:
Timestamp:
Nov 10, 2009, 2:52:43 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • Update deplist for Debian support
  • Fix #363 where exclude_paths was extended up to memory limit dumping core
  • Default to DVD size when in iso or netfs mode
  • Improve analysis of kernel modules by printing whether it's a live or extra module which has not been found (Matthew Cline) as reported in #362
  • Remove useless pb_log and MONDO_TRACEFILE
  • /dev/shm is now part of the default exclude list
  • some distro hold lvm commands under /usr/sbin
  • bzip2 is under /bin on Debian

(merge from 2.2.9 branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/common/libmondo-devices.c

    r2462 r2475  
    19061906char *mounted_on_dsf = NULL;
    19071907char *not_mounted_on_dsf = NULL;
    1908 char token_chars[] =" \t\r\f\a\0";
     1908char token_chars[] =" \t\r\f\a\0\n";
    19091909
    19101910while ((token = mr_strtok(pathlist, token_chars, &lastpos)) != NULL) {
     
    19251925                log_to_screen("  %s\n", mounted_on_dsf);
    19261926                log_msg (5, "Adding to bkpinfo->exclude_paths due to -E option: %s", mounted_on_dsf);
    1927                 mr_strcat(bkpinfo->exclude_paths, "%s ", mounted_on_dsf);
     1927                mr_strcat(bkpinfo->exclude_paths, " %s ", mounted_on_dsf);
    19281928                mr_strcat(bkpinfo->exclude_devs, " %s ", token);
    19291929            }
     
    19361936                log_to_screen("Not archiving the following file systems:\n");
    19371937                log_to_screen("  %s\n", not_mounted_on_dsf);
    1938                 strcat(bkpinfo->exclude_paths, not_mounted_on_dsf);
    1939                 strcat(bkpinfo->exclude_paths, "");
     1938                mr_strcat(bkpinfo->exclude_paths, " %s ", mounted_on_dsf);
    19401939            }
    19411940        }
     
    19481947    case -1:
    19491948        if (mode == 'E') {
    1950             mr_strcat(bkpinfo->exclude_paths, "%s ", token);
     1949            /*  Add the token if not already in the list */
     1950            if (strstr(bkpinfo->exclude_paths,token) == NULL) {
     1951                mr_strcat(bkpinfo->exclude_paths, " %s ", token);
     1952            }
    19511953        } else {
    1952             mr_strcat(bkpinfo->include_paths, "%s ", token);
     1954            /*  Add the token if not already in the list */
     1955            if (strstr(bkpinfo->include_paths,token) == NULL) {
     1956                mr_strcat(bkpinfo->include_paths, " %s ", token);
     1957            }
    19531958        }
    19541959        break;
     
    28192824            if (!bkpinfo->restore_data) {
    28202825                mr_asprintf(comment, "How much data (in Megabytes) will each media store?");
    2821                 // BERLIOS: 4480 shouldn't be hardcoded here
    2822                 sz_size = popup_and_get_string("Size", comment, "4480");
     2826                mr_asprintf(tmp, "%d", DEFAULT_DVD_DISK_SIZE);
     2827                sz_size = popup_and_get_string("Size", comment, tmp);
    28232828                mr_free(comment);
     2829                mr_free(tmp);
    28242830                if (sz_size == NULL) {
    28252831                    log_to_screen("User has chosen not to backup the PC");
     
    29322938                    finish(1);
    29332939                }
    2934                 p = popup_and_get_string("ISO size.", "Please enter how big you want each ISO image to be (in megabytes). This should be less than or equal to the size of the CD-R[W]'s or DVD's you plan to backup to.", sz_size);
     2940                mr_asprintf(tmp, "%d", DEFAULT_DVD_DISK_SIZE);
     2941                p = popup_and_get_string("ISO size.", "Please enter how big you want each ISO image to be (in megabytes). This should be less than or equal to the size of the CD-R[W]'s (700) or DVD's (4480) you plan to backup to.", tmp);
     2942                mr_free(tmp);
    29352943                if (p == NULL) {
    29362944                    log_to_screen("User has chosen not to backup the PC");
     
    31163124    }
    31173125    log_it("compression = %ld", bkpinfo->compression_level);
     3126    log_it("exclude_path = %s", bkpinfo->exclude_paths);
     3127    log_it("include_path = %s", bkpinfo->include_paths);
    31183128
    31193129    /* Handle devices passed in bkpinfo and print result */
    3120     mr_make_devlist_from_pathlist(bkpinfo->exclude_paths, 'E');
    3121     mr_make_devlist_from_pathlist(bkpinfo->include_paths, 'I');
     3130    /*  the mr_make_devlist_from_pathlist function appends
     3131    *  to the *_paths variables so copy before */
     3132    mr_asprintf(tmp, "%s ", bkpinfo->exclude_paths);
     3133    mr_make_devlist_from_pathlist(tmp, 'E');
     3134    mr_free(tmp);
     3135    mr_asprintf(tmp, "%s ", bkpinfo->include_paths);
     3136    mr_make_devlist_from_pathlist(tmp, 'I');
     3137    mr_free(tmp);
    31223138
    31233139    log_it("scratchdir = '%s'", bkpinfo->scratchdir);
Note: See TracChangeset for help on using the changeset viewer.