Changeset 1315 in MondoRescue for branches/2.2.2/mondo/src/mondorestore
- Timestamp:
- Apr 16, 2007, 4:13:59 PM (17 years ago)
- Location:
- branches/2.2.2/mondo/src/mondorestore
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.2/mondo/src/mondorestore/Makefile.am
r899 r1315 7 7 mondo-restore-EXT.h mr-externs.h \ 8 8 mondo-rstr-compare-EXT.h mondo-rstr-tools-EXT.h mondoprep.h 9 mondorestore.h 9 10 10 11 ## The program -
branches/2.2.2/mondo/src/mondorestore/mondo-prep.c
r1303 r1315 337 337 /** buffers **********************************************/ 338 338 char *tmp; 339 char *tmp1 = NULL; 339 340 char *incoming; 340 341 char *command; … … 486 487 log_it("%s... so I'll get creative.", tmp); 487 488 if (lvmversion == 2) { 488 strcpy(tmp, call_program_and_get_last_line_of_output 489 ("tail -n5 /var/log/mondo-archive.log | grep Insufficient | tail -n1")); 489 asprintf(&tmp1, "tail -n5 %s | grep Insufficient | tail -n1", MONDO_LOGFILE); 490 strcpy(tmp, call_program_and_get_last_line_of_output(tmp1)); 491 free(tmp1); 490 492 } else { 491 strcpy(tmp, call_program_and_get_last_line_of_output 492 ("tail -n5 /var/log/mondo-archive.log | grep lvcreate | tail -n1")); 493 asprintf(&tmp1, "tail -n5 %s | grep lvcreate | tail -n1", MONDO_LOGFILE); 494 strcpy(tmp, call_program_and_get_last_line_of_output(tmp1)); 495 free(tmp1); 493 496 } 494 497 for (p = tmp; *p != '\0' && !isdigit(*p); p++); -
branches/2.2.2/mondo/src/mondorestore/mondo-restore.c
r1295 r1315 18 18 #include "mr-externs.h" 19 19 #include "mondo-restore.h" 20 #include "mondorestore.h" 20 21 #include "mondo-rstr-compare-EXT.h" 21 22 #include "mondo-rstr-tools-EXT.h" … … 2986 2987 make_hole_for_dir("/tmp/tmpfs"); /* just in case... */ 2987 2988 run_program_and_log_output("umount " MNT_CDROM, FALSE); 2988 run_program_and_log_output2989 2989 /* 2990 run_program_and_log_output("ln -sf /var/log/mondo-archive.log /tmp/mondo-restore.log", 2990 2991 FALSE); 2992 */ 2991 2993 2992 2994 run_program_and_log_output("rm -Rf /tmp/tmpfs/mondo.tmp.*", FALSE); … … 3343 3345 sprintf(tmp, "rm -Rf %s", bkpinfo->tmpdir); 3344 3346 run_program_and_log_output(tmp, FALSE); 3345 log_to_screen 3346 ("Restore log copied to /tmp/mondo-restore.log on your hard disk"); 3347 log_to_screen("Restore log (%s) copied to /var/log on your hard disk", MONDO_LOGFILE); 3347 3348 sprintf(tmp, 3348 3349 "Mondo-restore is exiting (retval=%d) ", -
branches/2.2.2/mondo/src/mondorestore/mondo-rstr-compare.c
r1294 r1315 162 162 } else { 163 163 sprintf(command_ptr, 164 "md5sum \"%s%s\" > /tmp/md5sum.txt 2> /tmp/errors .txt",164 "md5sum \"%s%s\" > /tmp/md5sum.txt 2> /tmp/errors", 165 165 MNT_RESTORING, bigfile_fname_ptr); 166 166 } 167 167 log_msg(2, command_ptr); 168 168 paranoid_system 169 ("cat /tmp/errors >> /tmp/mondo-restore.log 2> /dev/null");169 ("cat /tmp/errors >> %s 2> /dev/null", MONDO_LOGFILE); 170 170 if (system(command_ptr)) { 171 171 log_OS_error("Warning - command failed"); -
branches/2.2.2/mondo/src/mondorestore/mondo-rstr-tools.c
r1242 r1315 1727 1727 mvaddstr_and_log_it(g_currentY++, 74, "Failed."); 1728 1728 log_to_screen 1729 ("GRUB ran w/error(s). See /tmp/mondo-restore.log for more info.");1729 ("GRUB ran w/error(s). See %s for more info.", MONDO_LOGFILE); 1730 1730 log_msg(1, "Type:-"); 1731 1731 log_msg(1, " mount-me"); … … 2003 2003 mvaddstr_and_log_it(g_currentY++, 74, "Failed."); 2004 2004 log_to_screen 2005 ("MBR+fstab processed w/error(s). See /tmp/mondo-restore.log for more info.");2005 ("MBR+fstab processed w/error(s). See %s for more info.", MONDO_LOGFILE); 2006 2006 } else { 2007 2007 mvaddstr_and_log_it(g_currentY++, 74, "Done."); … … 2248 2248 2249 2249 if (run_program_and_log_output 2250 ("cp -f /tmp/mondo-restore.log " MNT_RESTORING "/tmp/", FALSE)) {2250 ("cp -f " MONDO_LOGFILE " " MNT_RESTORING "/var/log", FALSE)) { 2251 2251 log_msg(1, 2252 "Error. Failed to copy log to PC's /tmp dir. (Mounted read-only?)"); 2253 } 2254 if (run_program_and_log_output 2255 ("cp -f /tmp/mondo-restore.log " MNT_RESTORING "/root/", FALSE)) { 2256 log_msg(1, 2257 "Error. Failed to copy log to PC's /root dir. (Mounted read-only?)"); 2252 "Error. Failed to copy log to PC's /var/log dir. (Mounted read-only?)"); 2258 2253 } 2259 2254 if (does_file_exist("/tmp/DUMBASS-GENTOO")) {
Note:
See TracChangeset
for help on using the changeset viewer.