Changeset 75 in MondoRescue for trunk/mondo/mondo/common/newt-specific.c


Ignore:
Timestamp:
Oct 20, 2005, 2:35:15 PM (19 years ago)
Author:
andree
Message:

Various changes to get archiving to NFS work in interactive mode. It
wasn't really like were were bugs, it appeared more like it was simply
not finished.

Side note: I believe that bkpinfo->isodir and bkpinfo->prefix were the
wrong way round in libmondo-archive.c and I've swapped them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/mondo/common/newt-specific.c

    r59 r75  
    9595    bool g_called_by_xmondo = FALSE;    ///< @bug Unneeded w/current XMondo.
    9696    char *g_erase_tmpdir_and_scratchdir;    ///< The command to run to erase the tmpdir and scratchdir at the end of Mondo.
     97char *g_selfmounted_isodir; ///< Holds the NFS mountpoint if mounted via mondoarchive.
    9798
    9899/* @} - end of globalGroup */
     
    257258            "-------FATAL ERROR---------";
    258259        char *tmp;
     260        char *command;
    259261        static bool already_exiting = FALSE;
    260262        int i;
     
    262264        /*@ end vars **************************************************** */
    263265
     266        malloc_string(command);
    264267        set_signals(FALSE);     // link to external func
    265268        g_exiting = TRUE;
     
    304307        if (g_erase_tmpdir_and_scratchdir[0]) {
    305308            run_program_and_log_output(g_erase_tmpdir_and_scratchdir, 5);
     309        }
     310
     311        if (g_selfmounted_isodir) {
     312          asprintf(&command, "umount %s", g_selfmounted_isodir);
     313          run_program_and_log_output(command, 5);
     314          asprintf(&command, "rmdir %s", g_selfmounted_isodir);
     315          run_program_and_log_output(command, 5);
    306316        }
    307317
     
    359369    void
    360370     finish(int signal) {
    361 
    362         /*  if (signal==0) { popup_and_OK("Please press <enter> to quit."); } */
     371            char *command;
     372            malloc_string(command);
     373       
     374            /*  if (signal==0) { popup_and_OK("Please press <enter> to quit."); } */
    363375
    364376        /* newtPopHelpLine(); */
     
    371383        if (g_erase_tmpdir_and_scratchdir) {
    372384            run_program_and_log_output(g_erase_tmpdir_and_scratchdir, 1);
     385        }
     386        if (g_selfmounted_isodir) {
     387          asprintf(&command, "umount %s", g_selfmounted_isodir);
     388          run_program_and_log_output(command, 1);
     389          asprintf(&command, "rmdir %s", g_selfmounted_isodir);
     390          run_program_and_log_output(command, 1);
    373391        }
    374392//  iamhere("foo");
Note: See TracChangeset for help on using the changeset viewer.