Changeset 1708


Ignore:
Timestamp:
Oct 27, 2007, 4:42:34 PM (12 years ago)
Author:
bruno
Message:
  • Supress g_erase_tmpdir_and_scratchdir
  • Improve some log messages for USB support
  • Try to improve install in mindi to avoid issues with isolinux.cfg not installed vene if in the pkg :-(
Location:
branches/2.2.5
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi/install.sh

    r1698 r1708  
    7272
    7373echo "Copying files ..."
    74 install -m 644 isolinux.cfg msg-txt sys-disk.raw.gz isolinux-H.cfg syslinux.cfg syslinux-H.cfg dev.tgz $locallib/mindi
     74install -m 644 isolinux.cfg msg-txt sys-disk.raw.gz isolinux-H.cfg syslinux.cfg syslinux-H.cfg dev.tgz $sublocallib
    7575install -m 644 deplist.txt $conf
    7676
  • branches/2.2.5/mondo/src/common/libmondo-archive.c

    r1703 r1708  
    13351335                        "Writing any remaining data to media         ");
    13361336
    1337     log_msg(1, "Closing tape/CD ... ");
    1338     if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type))
     1337    log_msg(1, "Closing tape/CD/USB ... ");
     1338    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    13391339        /* write tape/cdstream */
    1340     {
    13411340        closeout_tape();
    1342     } else
     1341    } else {
    13431342        /* write final ISO/USB */
    1344     {
    13451343        res = write_final_iso_if_necessary();
    13461344        retval += res;
     
    14241422        write_data_disks_to_stream(data_disks_file);
    14251423    } else {
    1426         log_msg(1, "Backing up to CD's");
     1424        if (bkpinfo->backup_media_type == usb) {
     1425            log_msg(1, "Backing up to USB's");
     1426        } else {
     1427            log_msg(1, "Backing up to CD's");
     1428        }
    14271429    }
    14281430
  • branches/2.2.5/mondo/src/common/libmondo-devices.c

    r1687 r1708  
    258258
    259259extern bool g_ISO_restore_mode;
    260 extern char *g_erase_tmpdir_and_scratchdir;
    261260extern char *g_selfmounted_isodir;
    262261extern char *MONDO_LOGFILE;
  • branches/2.2.5/mondo/src/common/libmondo-tools.c

    r1666 r1708  
    191191
    192192extern int g_tape_buffer_size_MB;
    193 extern char *g_erase_tmpdir_and_scratchdir;
    194193extern char *g_serial_string;
    195194extern bool g_text_mode;
     
    16221621        malloc_string(g_mondo_home);
    16231622        malloc_string(g_tmpfs_mountpt);
    1624         malloc_string(g_erase_tmpdir_and_scratchdir);
    16251623        malloc_string(g_serial_string);
    16261624        malloc_string(g_magicdev_command);
     
    16291627        paranoid_free(g_mondo_home);
    16301628        paranoid_free(g_tmpfs_mountpt);
    1631         paranoid_free(g_erase_tmpdir_and_scratchdir);
    16321629        paranoid_free(g_serial_string);
    16331630        paranoid_free(g_magicdev_command);
     
    16391636       &g_mondo_home,
    16401637       &g_tmpfs_mountpt,
    1641        &g_erase_tmpdir_and_scratchdir,
    16421638       &g_serial_string,
    16431639       &g_magicdev_command,
  • branches/2.2.5/mondo/src/common/newt-specific.c

    r1703 r1708  
    191191     g_xmondo_stdout[MAX_NEWT_COMMENT_LEN]; ///< .... @bug Unneeded w/current XMondo.
    192192    bool g_called_by_xmondo = FALSE;    ///< @bug Unneeded w/current XMondo.
    193     char *g_erase_tmpdir_and_scratchdir;    ///< The command to run to erase the tmpdir and scratchdir at the end of Mondo.
    194193    char *g_selfmounted_isodir; ///< Holds the NFS mountpoint if mounted via mondoarchive.
    195194
     
    420419        }
    421420
    422         if (g_erase_tmpdir_and_scratchdir[0]) {
    423             run_program_and_log_output(g_erase_tmpdir_and_scratchdir, 5);
    424         }
    425 
    426421        if (g_selfmounted_isodir) {
    427422            sprintf(command, "umount %s", g_selfmounted_isodir);
     
    470465    void
    471466     finish(int signal) {
    472         char *command;
    473         malloc_string(command);
     467        char *command = NULL;
    474468
    475469        /*  if (signal==0) { popup_and_OK("Please press <enter> to quit."); } */
     
    483477                                   FALSE);
    484478        if (g_selfmounted_isodir) {
    485             sprintf(command, "umount %s", g_selfmounted_isodir);
     479            asprintf(&command, "umount %s", g_selfmounted_isodir);
    486480            run_program_and_log_output(command, 1);
    487             sprintf(command, "rmdir %s", g_selfmounted_isodir);
     481            paranoid_free(command);
     482            asprintf(&command, "rmdir %s", g_selfmounted_isodir);
    488483            run_program_and_log_output(command, 1);
     484            paranoid_free(command);
    489485        }
    490486        if (!g_text_mode) {
     
    499495        printf("Execution run ended; result=%d\n", signal);
    500496        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         }
     497        asprintf(&command, "rm -Rf %s %s", bkpinfo->tmpdir, bkpinfo->scratchdir);
     498        system(command);
    504499        paranoid_free(command);
    505500        paranoid_free(bkpinfo);
  • branches/2.2.5/mondo/src/mondoarchive/main.c

    r1703 r1708  
    133133extern char *g_mondo_home;
    134134extern char *g_tmpfs_mountpt;
    135 extern char *g_erase_tmpdir_and_scratchdir;
    136135extern char *g_cdrw_drive_is_here;
    137136static char *g_cdrom_drive_is_here = NULL;
     
    459458    log_to_screen
    460459        ("BusyBox's sources are available from http://www.busybox.net");
    461     sprintf(g_erase_tmpdir_and_scratchdir, "rm -Rf %s %s", bkpinfo->tmpdir,
    462             bkpinfo->scratchdir);
    463460
    464461    /* If we're meant to backup then backup */
     
    556553    log_msg(0, "Time finished: %s", mr_date());
    557554
    558     chdir("/tmp");              // just in case there's something wrong with g_erase_tmpdir_and_scratchdir
     555    chdir("/tmp");
    559556
    560557    if (!g_text_mode) {
Note: See TracChangeset for help on using the changeset viewer.