Changeset 3654 in MondoRescue


Ignore:
Timestamp:
Mar 8, 2017, 3:56:44 PM (7 years ago)
Author:
Bruno Cornec
Message:

Fix an eror when restoring live, bkpinfo->media_device is left empty and what_number_cd_is_this wasn't computing the right value.

Location:
branches/3.3/mondo/src/common
Files:
2 edited

Legend:

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

    r3653 r3654  
    30063006    assert(bkpinfo != NULL);
    30073007//  log_it("Asking what_number_cd_is_this");
    3008     if (g_ISO_restore_mode) {
     3008    if ((g_ISO_restore_mode) || (g_restoring_live_from_cd)) {
    30093009        tmp = call_program_and_get_last_line_of_output("mount | grep iso9660 | awk '{print $3;}'");
    30103010        mr_asprintf(mountdev, "%s%s", tmp, "/archives/THIS-CD-NUMBER");
     
    30163016    }
    30173017
     3018    if (!bkpinfo->media_device[0]) {
     3019        log_it("ERROR: bkpinfo->media_device shoulnd't be empty here\n");
     3020        return(0);
     3021    }
    30183022    mr_asprintf(mountdev, "%s", bkpinfo->media_device);
    30193023    if (!mountdev[0]) {
  • branches/3.3/mondo/src/common/libmondo-tools.c

    r3618 r3654  
    11891189    log_msg(4, "About to set g_boot_mountpt[0] to '\\0'");
    11901190    g_boot_mountpt[0] = '\0';
    1191     log_msg(4, "Done. Great. Seeting command to something");
     1191    log_msg(4, "Done. Great. Setting command to something");
    11921192    mr_asprintf(command, "%s", "grep -v \":\" /etc/fstab | grep -vE '^#.*$' | grep -E \"[   ]/boot[     ]\" | tr -s ' ' '\t' | cut -f1 | head -n1");
    11931193    log_msg(4, "Cool. Command = '%s'", command);
Note: See TracChangeset for help on using the changeset viewer.