Ignore:
Timestamp:
Jun 9, 2007, 12:32:38 AM (17 years ago)
Author:
Bruno Cornec
Message:

Attempt to fix #136 (without floppy mondorestore may hang due to a mount command blocked)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.4/mondo/src/mondorestore/mondo-rstr-tools.c

    r1451 r1496  
    24112411    run_program_and_log_output(tmp, FALSE);
    24122412
    2413     sprintf(command, "mount /dev/fd0u1722 %s", mountpt);
    2414     sprintf(tmp,
     2413    /* Is there a floppy drive detected */
     2414    sprintf(tmp, "%s", call_program_and_get_last_line_of_output("dmesg | grep -i floppy"));
     2415    if (strcmp(tmp, "")) {
     2416        sprintf(command, "mount /dev/fd0u1722 %s", mountpt);
     2417        sprintf(tmp,
    24152418            "(sleep 15; kill `ps | grep \"%s\" | cut -d' ' -f1` 2> /dev/null) &",
    24162419            command);
    2417     log_msg(1, "tmp = '%s'", tmp);
    2418     system(tmp);
    2419     res = run_program_and_log_output(command, FALSE);
    2420     if (res) {
    2421         sprintf(command, "mount /dev/fd0H1440 %s", mountpt);
     2420        log_msg(1, "tmp = '%s'", tmp);
     2421        system(tmp);
    24222422        res = run_program_and_log_output(command, FALSE);
     2423        if (res) {
     2424            sprintf(command, "mount /dev/fd0H1440 %s", mountpt);
     2425            res = run_program_and_log_output(command, FALSE);
     2426        }
     2427    } else {
     2428        res = 1;
    24232429    }
    24242430    if (res) {
     
    24282434        log_msg(2,
    24292435                "Mounted floppy OK but I don't trust it because the archives might contain more up-to-date config file than the floppy does.");
    2430 // NB: If busybox does not support 'mount -o loop' then Plan A WILL NOT WORK.
     2436        // NB: If busybox does not support 'mount -o loop' then Plan A WILL NOT WORK.
    24312437        log_msg(2, "Processing floppy (plan A?)");
    24322438        sprintf(ramdisk_fname, "%s/mindi.rdz", mountpt);
Note: See TracChangeset for help on using the changeset viewer.