Changeset 1770 in MondoRescue for branches/stable/mondo/src/mondoarchive/mondoarchive.c
- Timestamp:
- Nov 6, 2007, 11:01:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/mondoarchive/mondoarchive.c
r1769 r1770 44 44 extern bool g_remount_cdrom_at_end, g_remount_floppy_at_end; 45 45 extern char *g_tmpfs_mountpt; 46 extern char *g_erase_tmpdir_and_scratchdir;47 46 extern char *g_cdrw_drive_is_here; 48 47 extern double g_kernel_version; … … 484 483 485 484 mr_msg(9, "Next"); 485 make_hole_for_dir(MONDO_CACHE); 486 486 487 welcome_to_mondoarchive(); 487 488 distro_specific_kludges_at_start_of_mondoarchive(); … … 620 621 (_("BusyBox's sources are available from http://www.busybox.net")); 621 622 622 sprintf(g_erase_tmpdir_and_scratchdir, "rm -Rf %s %s", bkpinfo->tmpdir,623 bkpinfo->scratchdir);624 623 625 624 /* If we're meant to backup then backup */ … … 660 659 } 661 660 662 if (length_of_file(M INDI_CACHE"/changed.files") > 2) {661 if (length_of_file(MONDO_CACHE"/changed.files") > 2) { 663 662 if (g_text_mode) { 664 663 log_to_screen 665 (_("Type 'less "M INDI_CACHE"/changed.files' to see which files don't match the archives"));664 (_("Type 'less "MONDO_CACHE"/changed.files' to see which files don't match the archives")); 666 665 } else { 667 666 mr_msg(1, 668 _("Type 'less "M INDI_CACHE"/changed.files' to see which files don't match the archives"));667 _("Type 'less "MONDO_CACHE"/changed.files' to see which files don't match the archives")); 669 668 mr_msg(2, "Calling popup_changelist_from_file()"); 670 popup_changelist_from_file(M INDI_CACHE"/changed.files");669 popup_changelist_from_file(MONDO_CACHE"/changed.files"); 671 670 mr_msg(2, "Returned from popup_changelist_from_file()"); 672 671 } 673 672 } else { 674 unlink(M INDI_CACHE"/changed.files");673 unlink(MONDO_CACHE"/changed.files"); 675 674 } 676 675 log_to_screen(say_at_end); … … 684 683 run_program_and_log_output(tmp, TRUE); 685 684 mr_free(tmp); 686 run_program_and_log_output(g_erase_tmpdir_and_scratchdir, TRUE); 685 if (bkpinfo->backup_media_type == usb) { 686 log_msg(1, "Unmounting USB device."); 687 mr_asprintf(&tmp, "umount %s1", bkpinfo->media_device); 688 run_program_and_log_output(tmp, TRUE); 689 mr_free(tmp); 690 } 687 691 688 692 run_program_and_log_output("mount", 2); 689 693 690 system("rm -f /var/cache/mondo-archive/last-backup.aborted");694 system("rm -f "MONDO_CACHE"/last-backup.aborted"); 691 695 if (!retval) { 692 696 printf(_("Mondoarchive ran OK.\n")); … … 697 701 register_pid(0, "mondo"); 698 702 set_signals(FALSE); 699 chdir("/tmp"); // just in case there's something wrong with g_erase_tmpdir_and_scratchdir 700 system(g_erase_tmpdir_and_scratchdir); 701 702 /* assemble command string for deletion of Mondo's tmp directory */ 703 sprintf(tmp, "rm -Rf %s", bkpinfo->tmpdir); 704 703 705 704 free_libmondo_global_strings(); 706 705 mr_free(bkpinfo); … … 717 716 mr_msg_close(); 718 717 719 /* remove Mondo's tmp directory */ 720 system(tmp); 721 paranoid_free(tmp); 718 chdir("/tmp"); 722 719 723 720 if (!g_text_mode) { … … 725 722 (_("Mondo Archive has finished its run. Please press ENTER to return to the shell prompt.")); 726 723 log_to_screen(_("See %s for details of backup run."), MONDO_LOGFILE); 727 finish(retval);728 724 } else { 729 725 printf(_("See %s for details of backup run.\n"), MONDO_LOGFILE); 730 726 mr_exit(retval, NULL); 731 727 } 728 finish(retval); 732 729 733 730 return EXIT_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.