Changeset 1737 in MondoRescue for branches/2.2.5/mondo/src/common


Ignore:
Timestamp:
Oct 30, 2007, 2:40:09 AM (17 years ago)
Author:
Bruno Cornec
Message:
  • Message fixes
  • Fix when restoring from USB: media is asked in interactive mode
Location:
branches/2.2.5/mondo/src/common
Files:
2 edited

Legend:

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

    r1709 r1737  
    19121912            }
    19131913        }
     1914        /* No break because we continue even for usb */
    19141915    case cdstream:
    1915         if (bkpinfo->disaster_recovery) {
     1916        if ((bkpinfo->disaster_recovery) && (bkpinfo->backup_media_type != usb)) {
    19161917            strcpy(bkpinfo->media_device, "/dev/cdrom");
    19171918            log_msg(2, "CD-ROM device assumed to be at %s",
    19181919                    bkpinfo->media_device);
    1919         } else if (bkpinfo->restore_data
     1920        } else if ((bkpinfo->restore_data && (bkpinfo->backup_media_type != usb))
    19201921                   || bkpinfo->backup_media_type == dvd) {
    19211922            if (!bkpinfo->media_device[0]) {
     
    19421943                    bkpinfo->media_device);
    19431944        } else {
    1944             if (find_cdrw_device(bkpinfo->media_device)) {
     1945            if ((find_cdrw_device(bkpinfo->media_device)) && (bkpinfo->backup_media_type != usb)) {
    19451946                bkpinfo->media_device[0] = '\0';
    19461947            }
     
    19551956            }
    19561957            if (!bkpinfo->media_device[0]) {
    1957                 if (g_kernel_version < 2.6) {
    1958                     i = popup_and_get_string("Device node?",
     1958                if (bkpinfo->backup_media_type == usb) {
     1959                    i = popup_and_get_string("/dev entry?",
     1960                                         "What is the /dev entry of your USB Disk/Key, please?",
     1961                                         bkpinfo->media_device,
     1962                                         MAX_STR_LEN / 4);
     1963                } else {
     1964                    if (g_kernel_version < 2.6) {
     1965                        i = popup_and_get_string("Device node?",
    19591966                                             "What is the SCSI node of your CD (re)writer, please?",
    1960                                              bkpinfo->media_device,
    1961                                              MAX_STR_LEN / 4);
    1962                 } else {
    1963                     if (bkpinfo->backup_media_type == usb) {
    1964                         i = popup_and_get_string("/dev entry?",
    1965                                              "What is the /dev entry of your USB Disk/Key, please?",
    19661967                                             bkpinfo->media_device,
    19671968                                             MAX_STR_LEN / 4);
  • branches/2.2.5/mondo/src/common/libmondo-tools.c

    r1708 r1737  
    11121112                        "Checking sanity of your Linux distribution");
    11131113#ifndef __FreeBSD__
    1114     if (system("which mkfs.vfat &> /dev/null")
    1115         && !system("which mkfs.msdos &> /dev/null")) {
     1114    if (system("which mkfs.vfat 2> /dev/null 1> /dev/null")
     1115        && !system("which mkfs.msdos 2> /dev/null 1> /dev/null")) {
    11161116        log_it
    11171117            ("OK, you've got mkfs.msdos but not mkfs.vfat; time for the fairy to wave her magic wand...");
Note: See TracChangeset for help on using the changeset viewer.