Changeset 2866 in MondoRescue


Ignore:
Timestamp:
Aug 23, 2011, 4:43:09 AM (13 years ago)
Author:
Bruno Cornec
Message:

r4226@localhost: bruno | 2011-08-23 03:11:12 +0200

  • Try to again improve the mount/umount stuff in mondo
File:
1 edited

Legend:

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

    r2847 r2866  
    15081508        return;
    15091509    }
     1510    if (g_ISO_restore_mode || bkpinfo->backup_media_type == iso
     1511        || bkpinfo->backup_media_type == netfs) {
     1512        g_ISO_restore_mode = TRUE;
     1513    }
    15101514    malloc_string(tmp);
    15111515    malloc_string(request);
    15121516    sprintf(tmp, "mkdir -p " MNT_CDROM);
    15131517    run_program_and_log_output(tmp, 5);
    1514     if (g_ISO_restore_mode || bkpinfo->backup_media_type == iso
    1515         || bkpinfo->backup_media_type == netfs) {
    1516         g_ISO_restore_mode = TRUE;
    1517         if (!is_this_device_mounted(MNT_CDROM)) {
    1518             log_msg(3, "Mounting media");
    1519             g_current_media_number = cd_number_i_want;
    1520             mount_media();
    1521         }
    1522     }
    15231518    if ((res = what_number_cd_is_this()) != cd_number_i_want) {
    15241519        log_msg(3, "Currently, we hold %d but we want %d", res,
    15251520                cd_number_i_want);
     1521
     1522        /* Now we need to umount the current media to have the next mounted after */
     1523        run_program_and_log_output("umount " MNT_CDROM, FALSE);
     1524        log_msg(3, "Mounting next media %d",cd_number_i_want);
     1525        g_current_media_number = cd_number_i_want;
     1526        mount_media();
     1527
    15261528        mds = media_descriptor_string(bkpinfo->backup_media_type);
    15271529        sprintf(tmp, "Insisting on %s #%d", mds, cd_number_i_want);
Note: See TracChangeset for help on using the changeset viewer.