Changeset 1703 in MondoRescue


Ignore:
Timestamp:
Oct 24, 2007, 1:59:37 AM (17 years ago)
Author:
Bruno Cornec
Message:
  • Add USB Key button to Menu UI (CD streamer removed)
  • Attempt to fix error messages on tmp/scratch files at the end by removing those dir at the latest possible.
Location:
branches/2.2.5/mondo/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mondo/src/common/libmondo-archive.c

    r1697 r1703  
    984984                __LINE__);
    985985    }
    986     log_to_screen(bkpinfo->tmpdir);
    987986    sprintf(tmp, "%s/BOOTLOADER.NAME", bkpinfo->tmpdir);
    988987    if (write_one_liner_data_file(tmp, bootldr_str)) {
  • branches/2.2.5/mondo/src/common/newt-specific.c

    r1665 r1703  
    482482        run_program_and_log_output("rm -Rf /mondo.scratch.* /tmp.mondo.*",
    483483                                   FALSE);
    484         if (g_erase_tmpdir_and_scratchdir) {
    485             run_program_and_log_output(g_erase_tmpdir_and_scratchdir, 1);
    486         }
    487484        if (g_selfmounted_isodir) {
    488485            sprintf(command, "umount %s", g_selfmounted_isodir);
     
    491488            run_program_and_log_output(command, 1);
    492489        }
    493 //  iamhere("foo");
    494         /* system("clear"); */
    495 //  iamhere("About to call newtFinished");
    496490        if (!g_text_mode) {
    497491            if (does_file_exist("/THIS-IS-A-RAMDISK")) {
     
    503497            }
    504498        }
    505 //  system("clear");
    506 //  iamhere("Finished calling newtFinished");
    507499        printf("Execution run ended; result=%d\n", signal);
    508500        printf("Type 'less %s' to see the output log\n", MONDO_LOGFILE);
     501        if (g_erase_tmpdir_and_scratchdir) {
     502            system(g_erase_tmpdir_and_scratchdir);
     503        }
     504        paranoid_free(command);
     505        paranoid_free(bkpinfo);
    509506        free_libmondo_global_strings();
    510507        exit(signal);
     
    13831380        b2 = newtButton(17, 1, "CD-RW disks");
    13841381        b3 = newtButton(1, 9, "Tape drive ");
    1385         b4 = newtButton(17, 5, "CD streamer");
     1382        b4 = newtButton(17, 5, "USB Key/Disk");
    13861383        b5 = newtButton(1, 5, " DVD disks ");
    13871384        b6 = newtButton(17, 9, " NFS mount ");
     
    14011398            output = tape;
    14021399        } else if (b_res == b4) {
    1403             output = cdstream;
     1400            output = usb;
    14041401        } else if (b_res == b5) {
    14051402            output = dvd;
  • branches/2.2.5/mondo/src/mondoarchive/main.c

    r1697 r1703  
    529529        run_program_and_log_output(tmp, TRUE);
    530530    }
    531     run_program_and_log_output(g_erase_tmpdir_and_scratchdir, TRUE);
    532531
    533532    run_program_and_log_output("mount", 2);
     
    542541    register_pid(0, "mondo");
    543542    set_signals(FALSE);
    544     chdir("/tmp");              // just in case there's something wrong with g_erase_tmpdir_and_scratchdir
    545     system(g_erase_tmpdir_and_scratchdir);
    546 
    547     /* assemble command string for deletion of Mondo's tmp directory */
    548     sprintf(tmp, "rm -Rf %s", bkpinfo->tmpdir);
    549    
     543
    550544    free_libmondo_global_strings();
    551545    paranoid_free(say_at_end);
    552     paranoid_free(bkpinfo);
     546   
    553547
    554548    if (!g_cdrom_drive_is_here) {
     
    562556    log_msg(0, "Time finished: %s", mr_date());
    563557
    564     /* remove Mondo's tmp directory */
    565     system(tmp);
    566     paranoid_free(tmp);
     558    chdir("/tmp");              // just in case there's something wrong with g_erase_tmpdir_and_scratchdir
    567559
    568560    if (!g_text_mode) {
     
    570562            ("Mondo Archive has finished its run. Please press ENTER to return to the shell prompt.");
    571563        log_to_screen("See %s for details of backup run.", MONDO_LOGFILE);
    572         finish(retval);
    573564    } else {
    574565        printf("See %s for details of backup run.\n", MONDO_LOGFILE);
    575         exit(retval);
    576     }
     566    }
     567    finish(retval);
    577568
    578569    return EXIT_SUCCESS;
Note: See TracChangeset for help on using the changeset viewer.