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)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/mondorestore/mondorestore.c

    r2872 r2878  
    278278        popup_and_OK("No restoring or comparing will take place today.");
    279279        if (is_this_device_mounted("/mnt/cdrom")) {
    280             run_program_and_log_output("umount /mnt/cdrom", FALSE);
     280            run_program_and_log_output("umount -d /mnt/cdrom", FALSE);
    281281        }
    282282        if (g_ISO_restore_mode) {
    283             sprintf(tmp, "umount %s", bkpinfo->isodir);
     283            sprintf(tmp, "umount -d %s", bkpinfo->isodir);
    284284            run_program_and_log_output(tmp, FALSE);
    285285        }
     
    730730    }
    731731    if (is_this_device_mounted(MNT_CDROM)) {
    732         paranoid_system("umount " MNT_CDROM);
     732        paranoid_system("umount -d " MNT_CDROM);
    733733    }
    734734//  if (! already_mounted)
    735735//    {
    736     if (system("umount /tmp/isodir 2> /dev/null")) {
     736    if (system("umount -d /tmp/isodir 2> /dev/null")) {
    737737        log_to_screen
    738738            ("WARNING - unable to unmount device where the ISO files are stored.");
     
    10121012                "Tape : I don't need to unmount or eject the CD-ROM.");
    10131013    } else {
    1014         run_program_and_log_output("umount " MNT_CDROM, FALSE);
     1014        run_program_and_log_output("umount -d " MNT_CDROM, FALSE);
    10151015        if (!bkpinfo->please_dont_eject) {
    10161016            eject_device(bkpinfo->media_device);
    10171017        }
    10181018    }
    1019     run_program_and_log_output("umount " MNT_CDROM, FALSE);
     1019    run_program_and_log_output("umount -d " MNT_CDROM, FALSE);
    10201020    if (!bkpinfo->please_dont_eject) {
    10211021        eject_device(bkpinfo->media_device);
     
    29142914    make_hole_for_dir("/var/log");
    29152915    make_hole_for_dir("/tmp/tmpfs");    /* just in case... */
    2916     run_program_and_log_output("umount " MNT_CDROM, FALSE);
     2916    run_program_and_log_output("umount -d " MNT_CDROM, FALSE);
    29172917    /*
    29182918    run_program_and_log_output("ln -sf /var/log/mondo-archive.log /tmp/mondorestore.log",
     
    32053205            run_program_and_log_output("sync", FALSE);
    32063206            if (is_this_device_mounted(MNT_CDROM)) {
    3207                 run_program_and_log_output("umount " MNT_CDROM, FALSE);
     3207                run_program_and_log_output("umount -d " MNT_CDROM, FALSE);
    32083208            }
    32093209
     
    32653265            retval);
    32663266    log_to_screen(tmp);
    3267     sprintf(tmp, "umount %s", bkpinfo->isodir);
     3267    sprintf(tmp, "umount -d %s", bkpinfo->isodir);
    32683268    run_program_and_log_output(tmp, 5);
    32693269    paranoid_free(mountlist);
Note: See TracChangeset for help on using the changeset viewer.