Changeset 1708 in MondoRescue for branches/2.2.5/mondo/src/common/newt-specific.c
- Timestamp:
- Oct 27, 2007, 4:42:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mondo/src/common/newt-specific.c
r1703 r1708 191 191 g_xmondo_stdout[MAX_NEWT_COMMENT_LEN]; ///< .... @bug Unneeded w/current XMondo. 192 192 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.194 193 char *g_selfmounted_isodir; ///< Holds the NFS mountpoint if mounted via mondoarchive. 195 194 … … 420 419 } 421 420 422 if (g_erase_tmpdir_and_scratchdir[0]) {423 run_program_and_log_output(g_erase_tmpdir_and_scratchdir, 5);424 }425 426 421 if (g_selfmounted_isodir) { 427 422 sprintf(command, "umount %s", g_selfmounted_isodir); … … 470 465 void 471 466 finish(int signal) { 472 char *command; 473 malloc_string(command); 467 char *command = NULL; 474 468 475 469 /* if (signal==0) { popup_and_OK("Please press <enter> to quit."); } */ … … 483 477 FALSE); 484 478 if (g_selfmounted_isodir) { 485 sprintf(command, "umount %s", g_selfmounted_isodir);479 asprintf(&command, "umount %s", g_selfmounted_isodir); 486 480 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); 488 483 run_program_and_log_output(command, 1); 484 paranoid_free(command); 489 485 } 490 486 if (!g_text_mode) { … … 499 495 printf("Execution run ended; result=%d\n", signal); 500 496 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); 504 499 paranoid_free(command); 505 500 paranoid_free(bkpinfo);
Note:
See TracChangeset
for help on using the changeset viewer.