Changeset 2878 in MondoRescue for branches/2.2.9/mondo/src/common


Ignore:
Timestamp:
Oct 5, 2011, 1:20:58 AM (13 years ago)
Author:
Bruno Cornec
Message:
  • Uses the -d option of the mount command to avoid leaving loop devices in use. Probably provoked by the usage of a more recent busybox, but anyway that option doesn't hurt, and does nothing for non-loop devices. Should fix the problems reported on the ML with NFS and more than 8 ISO images (8 being the default number of loop devices available)
Location:
branches/2.2.9/mondo/src/common
Files:
3 edited

Legend:

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

    r2866 r2878  
    15211521
    15221522        /* Now we need to umount the current media to have the next mounted after */
    1523         run_program_and_log_output("umount " MNT_CDROM, FALSE);
     1523        run_program_and_log_output("umount -d " MNT_CDROM, FALSE);
    15241524        log_msg(3, "Mounting next media %d",cd_number_i_want);
    15251525        g_current_media_number = cd_number_i_want;
     
    15351535            if (is_this_device_mounted(MNT_CDROM)) {
    15361536                res =
    1537                     run_program_and_log_output("umount " MNT_CDROM, FALSE);
     1537                    run_program_and_log_output("umount -d " MNT_CDROM, FALSE);
    15381538            } else {
    15391539                res = 0;
  • branches/2.2.9/mondo/src/common/libmondo-verify.c

    r2380 r2878  
    10261026    verify_all_slices_on_CD(mountpoint);
    10271027
    1028     mr_asprintf(&tmp1, "umount %s", mountpoint);
     1028    mr_asprintf(&tmp1, "umount -d %s", mountpoint);
    10291029#ifdef __FreeBSD__
    10301030    ret += system(tmp1);
     
    11501150#ifdef __FreeBSD__
    11511151    ret = 0;
    1152     sprintf(command, "umount %s", mountpoint);
     1152    sprintf(command, "umount -d %s", mountpoint);
    11531153    ret += system(command);
    11541154    ret += kick_vn(mddevice);
    11551155    if (ret)
    11561156#else
    1157     sprintf(command, "umount %s", mountpoint);
     1157    sprintf(command, "umount -d %s", mountpoint);
    11581158    if (system(command))
    11591159#endif
     
    11661166    }
    11671167    if (!does_file_exist(fname)) {
    1168         sprintf(command, "umount %s", bkpinfo->media_device);
     1168        sprintf(command, "umount -d %s", bkpinfo->media_device);
    11691169        run_program_and_log_output(command, 2);
    11701170        if (!bkpinfo->please_dont_eject
  • branches/2.2.9/mondo/src/common/newt-specific.c

    r2771 r2878  
    349349        chdir("/");
    350350        if (g_selfmounted_isodir) {
    351             sprintf(command, "umount %s", g_selfmounted_isodir);
     351            sprintf(command, "umount -d %s", g_selfmounted_isodir);
    352352            run_program_and_log_output(command, 5);
    353353            sprintf(command, "rmdir %s", g_selfmounted_isodir);
     
    406406
    407407        chdir("/");
    408         run_program_and_log_output("umount " MNT_CDROM, FALSE);
     408        run_program_and_log_output("umount -d " MNT_CDROM, FALSE);
    409409        if (g_selfmounted_isodir) {
    410             mr_asprintf(&command, "umount %s", g_selfmounted_isodir);
     410            mr_asprintf(&command, "umount -d %s", g_selfmounted_isodir);
    411411            run_program_and_log_output(command, 1);
    412412            paranoid_free(command);
Note: See TracChangeset for help on using the changeset viewer.