Changeset 2878


Ignore:
Timestamp:
Oct 5, 2011, 1:20:58 AM (7 years ago)
Author:
bruno
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
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/rootfs/sbin/find-and-mount-cdrom

    r2734 r2878  
    3434        fi
    3535        LogIt "$device has a CD-ROM in it"
    36         umount /mnt/cdrom
     36        umount -d /mnt/cdrom
    3737        ln -sf $device /dev/cdrom
    3838        if [ "$?" -ne "0" ]; then
  • branches/2.2.9/mindi/rootfs/sbin/init

    r2846 r2878  
    825825ConfigureLoggingDaemons
    826826if [ -e "/tmp/USE-DEVFS" ] ; then
    827     umount /mnt/cdrom 2> /dev/null
     827    umount -d /mnt/cdrom 2> /dev/null
    828828    mv /dev/cdrom /cdrom.lnk 2> /dev/null
    829829    CD_MOUNTED_OK=""
     
    963963else
    964964    echo -en "Type 'exit' to reboot the PC\n"
    965     umount /mnt/cdrom 2> /dev/null
     965    umount -d /mnt/cdrom 2> /dev/null
    966966    mount / -o rw,remount > /dev/null 2> /dev/null
    967967    LogIt "Launching Shell"
  • branches/2.2.9/mindi/rootfs/sbin/install-additional-tools

    r2371 r2878  
    5858    cd $old_pwd
    5959    echo -e -n "\r"
    60     [ ! -e "/tmp/CDROM-LIVES-HERE" ] && umount $mountpoint
     60    [ ! -e "/tmp/CDROM-LIVES-HERE" ] && umount -d $mountpoint
    6161    sleep 1
    6262fi
  • 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);
  • branches/2.2.9/mondo/src/mondorestore/mondo-rstr-tools.c

    r2847 r2878  
    304304    return (1);
    305305}
    306 paranoid_system("umount " MNT_CDROM " 2> /dev/null");   /* just in case */
     306paranoid_system("umount -d " MNT_CDROM " 2> /dev/null");    /* just in case */
    307307
    308308if (is_this_device_mounted(g_isodir_device)) {
     
    681681        if (does_file_exist(MNT_CDROM "/archives/filelist.0")) {
    682682            bkpinfo->backup_media_type = cdr;
    683             run_program_and_log_output("umount " MNT_CDROM, 1);
     683            run_program_and_log_output("umount -d " MNT_CDROM, 1);
    684684            log_it
    685685                ("Re-jigging configuration AGAIN. CD-R, not ISO.");
     
    22542254        }
    22552255    }
    2256     run_program_and_log_output("umount " MNT_CDROM, FALSE);
     2256    run_program_and_log_output("umount -d " MNT_CDROM, FALSE);
    22572257    if (!does_file_exist(cfg_file)) {
    22582258        log_it("%s",cfg_file);
  • 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.