Changeset 541 in MondoRescue for branches/stable/mondo/mondo/mondorestore/mondo-restore.c
- Timestamp:
- May 13, 2006, 8:47:23 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/mondo/mondorestore/mondo-restore.c
r497 r541 505 505 * The message to display if we detect that the user is using a Compaq Proliant. 506 506 */ 507 #define COMPAQ_PROLIANTS_SUCK _("Partition and format your disk using Compaq's disaster recovery CD. After you've done that, please reboot with your Mondo CD/floppy in Interactive Mode.")507 #define COMPAQ_PROLIANTS_SUCK "Partition and format your disk using Compaq's disaster recovery CD. After you've done that, please reboot with your Mondo CD/floppy in Interactive Mode." 508 508 509 509 … … 535 535 if (!does_file_exist(g_mountlist_fname)) { 536 536 log_to_screen(g_mountlist_fname); 537 log_to_screen( _("does not exist"));537 log_to_screen("does not exist"); 538 538 return (1); 539 539 } … … 543 543 if (retval) { 544 544 log_to_screen 545 ( _("Warning - load_raidtab_into_raidlist returned an error"));545 ("Warning - load_raidtab_into_raidlist returned an error"); 546 546 } 547 547 res = edit_mountlist(g_mountlist_fname, mountlist, raidlist); … … 553 553 save_raidlist_to_raidtab(raidlist, RAIDTAB_FNAME); 554 554 555 log_to_screen( _("I have finished editing the mountlist for you."));555 log_to_screen("I have finished editing the mountlist for you."); 556 556 557 557 return (retval); … … 602 602 popup_and_OK(COMPAQ_PROLIANTS_SUCK); 603 603 if (ask_me_yes_or_no 604 ( _("Would you like to reboot and use your Compaq CD to prep your hard drive?")))604 ("Would you like to reboot and use your Compaq CD to prep your hard drive?")) 605 605 { 606 606 fatal_error 607 ( _("Aborting. Please reboot and prep your hard drive with your Compaq CD."));607 ("Aborting. Please reboot and prep your hard drive with your Compaq CD."); 608 608 } 609 609 } … … 642 642 interactively_obtain_media_parameters_from_user(bkpinfo, FALSE); 643 643 } else { 644 popup_and_OK( _("No restoring or comparing will take place today."));644 popup_and_OK("No restoring or comparing will take place today."); 645 645 if (is_this_device_mounted("/mnt/cdrom")) { 646 646 run_program_and_log_output("umount /mnt/cdrom", FALSE); … … 774 774 if (g_text_mode) { 775 775 if (!ask_me_yes_or_no 776 ( _("Interactive Mode + textonly = experimental! Proceed anyway?")))776 ("Interactive Mode + textonly = experimental! Proceed anyway?")) 777 777 { 778 778 fatal_error("Wise move."); … … 815 815 save_mountlist_to_disk(mountlist, g_mountlist_fname); 816 816 save_raidlist_to_raidtab(raidlist, RAIDTAB_FNAME); 817 mvaddstr_and_log_it(1, 30, _("Restoring Interactively"));817 mvaddstr_and_log_it(1, 30, "Restoring Interactively"); 818 818 if (bkpinfo->differential) { 819 log_to_screen( _("Because this is a differential backup, disk"));819 log_to_screen("Because this is a differential backup, disk"); 820 820 log_to_screen 821 ( _(" partitioning and formatting will not take place."));821 (" partitioning and formatting will not take place."); 822 822 done = TRUE; 823 823 } else { 824 824 if (ask_me_yes_or_no 825 ( _("Do you want to erase and partition your hard drives?"))) {825 ("Do you want to erase and partition your hard drives?")) { 826 826 if (partition_table_contains_Compaq_diagnostic_partition 827 827 (mountlist)) { … … 834 834 if (ptn_errs) { 835 835 log_to_screen 836 ( _("Warning. Errors occurred during disk partitioning."));836 ("Warning. Errors occurred during disk partitioning."); 837 837 } 838 838 … … 840 840 if (!fmt_errs) { 841 841 log_to_screen 842 ( _("Errors during disk partitioning were handled OK."));842 ("Errors during disk partitioning were handled OK."); 843 843 log_to_screen 844 ( _("Partitions were formatted OK despite those errors."));844 ("Partitions were formatted OK despite those errors."); 845 845 ptn_errs = 0; 846 846 } … … 852 852 } else { 853 853 mvaddstr_and_log_it(g_currentY++, 0, 854 _("User opted not to partition the devices"));854 "User opted not to partition the devices"); 855 855 if (ask_me_yes_or_no 856 ( _("Do you want to format your hard drives?"))) {856 ("Do you want to format your hard drives?")) { 857 857 fmt_errs = format_everything(mountlist, TRUE); 858 858 if (!fmt_errs) { … … 867 867 mvaddstr_and_log_it(g_currentY++, 868 868 0, 869 _("Errors occurred. Please repartition and format drives manually."));869 "Errors occurred. Please repartition and format drives manually."); 870 870 done = FALSE; 871 871 } … … 873 873 mvaddstr_and_log_it(g_currentY++, 874 874 0, 875 _("Errors occurred during partitioning. Formatting, however, went OK."));875 "Errors occurred during partitioning. Formatting, however, went OK."); 876 876 done = TRUE; 877 877 } 878 878 if (!done) { 879 if (!ask_me_yes_or_no( _("Re-edit the mountlist?"))) {879 if (!ask_me_yes_or_no("Re-edit the mountlist?")) { 880 880 retval++; 881 881 goto end_of_func; … … 893 893 /* restore */ 894 894 if ((restore_all = 895 ask_me_yes_or_no( _("Do you want me to restore all of your data?"))))895 ask_me_yes_or_no("Do you want me to restore all of your data?"))) 896 896 { 897 897 log_msg(1, "Restoring all data"); … … 900 900 if ((restore_all = 901 901 ask_me_yes_or_no 902 ( _("Do you want me to restore _some_ of your data?")))) {902 ("Do you want me to restore _some_ of your data?"))) { 903 903 strcpy(old_restpath, bkpinfo->restore_path); 904 904 for (done = FALSE; !done;) { … … 913 913 // (NB: %s is where your filesystem is mounted now, by default)", MNT_RESTORING); 914 914 if (popup_and_get_string 915 ( _("Restore path"), _("Restore files to where?"), tmp,915 ("Restore path", "Restore files to where?", tmp, 916 916 MAX_STR_LEN / 4)) { 917 917 if (!strcmp(tmp, "/")) { 918 if (!ask_me_yes_or_no( _("Are you sure?"))) {918 if (!ask_me_yes_or_no("Are you sure?")) { 919 919 goto gotos_suck; 920 920 } … … 930 930 } 931 931 if (!ask_me_yes_or_no 932 ( _("Restore another subset of your backup?"))) {932 ("Restore another subset of your backup?")) { 933 933 done = TRUE; 934 934 } … … 941 941 mvaddstr_and_log_it(g_currentY++, 942 942 0, 943 _("User opted not to restore any data. "));943 "User opted not to restore any data. "); 944 944 } 945 945 if (retval) { 946 946 mvaddstr_and_log_it(g_currentY++, 947 947 0, 948 _("Errors occurred during the restore phase. "));949 } 950 951 if (ask_me_yes_or_no( _("Initialize the boot loader?"))) {948 "Errors occurred during the restore phase. "); 949 } 950 951 if (ask_me_yes_or_no("Initialize the boot loader?")) { 952 952 run_boot_loader(TRUE); 953 953 } else { 954 954 mvaddstr_and_log_it(g_currentY++, 955 955 0, 956 _("User opted not to initialize the boot loader."));956 "User opted not to initialize the boot loader."); 957 957 } 958 958 … … 963 963 /* if (restore_some || restore_all || */ 964 964 if (ask_me_yes_or_no 965 ( _("Label your ext2 and ext3 partitions if necessary?"))) {965 ("Label your ext2 and ext3 partitions if necessary?")) { 966 966 mvaddstr_and_log_it(g_currentY, 0, 967 _("Using e2label to label your ext2,3 partitions"));967 "Using e2label to label your ext2,3 partitions"); 968 968 if (does_file_exist("/tmp/fstab.new")) { 969 969 strcpy(fstab_fname, "/tmp/fstab.new"); … … 978 978 if (res) { 979 979 log_to_screen 980 ( _("label-partitions-as-necessary returned an error"));981 mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));980 ("label-partitions-as-necessary returned an error"); 981 mvaddstr_and_log_it(g_currentY++, 74, "Failed."); 982 982 } else { 983 983 mvaddstr_and_log_it(g_currentY++, 74, "Done."); … … 990 990 mvaddstr_and_log_it(g_currentY++, 991 991 0, 992 _("Warning - errors occurred during the restore phase."));992 "Warning - errors occurred during the restore phase."); 993 993 } 994 994 end_of_func: … … 1042 1042 retval += compare_mode(bkpinfo, mountlist, raidlist); 1043 1043 } else { 1044 log_to_screen( _("OK, I shan't restore/compare any files."));1044 log_to_screen("OK, I shan't restore/compare any files."); 1045 1045 } 1046 1046 } … … 1052 1052 if (system("umount /tmp/isodir 2> /dev/null")) { 1053 1053 log_to_screen 1054 ( _("WARNING - unable to unmount device where the ISO files are stored."));1054 ("WARNING - unable to unmount device where the ISO files are stored."); 1055 1055 } 1056 1056 // } … … 1113 1113 if (!evaluate_mountlist(mountlist, tmpA, tmpB, tmpC)) { 1114 1114 sprintf(tmp, 1115 _("Mountlist analyzed. Result: \"%s %s %s\" Switch to Interactive Mode?"),1115 "Mountlist analyzed. Result: \"%s %s %s\" Switch to Interactive Mode?", 1116 1116 tmpA, tmpB, tmpC); 1117 1117 if (ask_me_yes_or_no(tmp)) { … … 1123 1123 } 1124 1124 save_mountlist_to_disk(mountlist, g_mountlist_fname); 1125 mvaddstr_and_log_it(1, 30, _("Restoring Automatically"));1125 mvaddstr_and_log_it(1, 30, "Restoring Automatically"); 1126 1126 if (bkpinfo->differential) { 1127 log_to_screen( _("Because this is a differential backup, disk"));1128 log_to_screen( _("partitioning and formatting will not take place."));1127 log_to_screen("Because this is a differential backup, disk"); 1128 log_to_screen("partitioning and formatting will not take place."); 1129 1129 res = 0; 1130 1130 } else { … … 1152 1152 if (res) { 1153 1153 log_to_screen 1154 ( _("Warning. Errors occurred during partitioning."));1154 ("Warning. Errors occurred during partitioning."); 1155 1155 res = 0; 1156 1156 } … … 1158 1158 retval += res; 1159 1159 if (!res) { 1160 log_to_screen( _("Preparing to format your disk(s)"));1160 log_to_screen("Preparing to format your disk(s)"); 1161 1161 sleep(1); 1162 1162 system("sync"); 1163 log_to_screen( _("Please wait. This may take a few minutes."));1163 log_to_screen("Please wait. This may take a few minutes."); 1164 1164 res += format_everything(mountlist, FALSE); 1165 1165 } … … 1171 1171 mvaddstr_and_log_it(g_currentY++, 1172 1172 0, 1173 _("Failed to partition and/or format your hard drives."));1174 1175 if (ask_me_yes_or_no( _("Try in interactive mode instead?"))) {1173 "Failed to partition and/or format your hard drives."); 1174 1175 if (ask_me_yes_or_no("Try in interactive mode instead?")) { 1176 1176 retval = interactive_mode(bkpinfo, mountlist, raidlist); 1177 1177 goto after_the_nuke; 1178 1178 } else 1179 1179 if (!ask_me_yes_or_no 1180 ( _("Would you like to try to proceed anyway?"))) {1180 ("Would you like to try to proceed anyway?")) { 1181 1181 return (retval); 1182 1182 } … … 1186 1186 unmount_all_devices(mountlist); 1187 1187 log_to_screen 1188 ( _("Unable to mount all partitions. Sorry, I cannot proceed."));1188 ("Unable to mount all partitions. Sorry, I cannot proceed."); 1189 1189 return (retval); 1190 1190 } … … 1202 1202 mvaddstr_and_log_it(g_currentY, 1203 1203 0, 1204 _("Using e2label to label your ext2,3 partitions"));1204 "Using e2label to label your ext2,3 partitions"); 1205 1205 1206 1206 sprintf(tmp, "label-partitions-as-necessary %s < /tmp/fstab", … … 1208 1208 res = run_program_and_log_output(tmp, TRUE); 1209 1209 if (res) { 1210 log_to_screen( _("label-partitions-as-necessary returned an error"));1211 mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));1210 log_to_screen("label-partitions-as-necessary returned an error"); 1211 mvaddstr_and_log_it(g_currentY++, 74, "Failed."); 1212 1212 } else { 1213 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));1213 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 1214 1214 } 1215 1215 retval += res; … … 1217 1217 after_the_nuke: 1218 1218 if (retval) { 1219 log_to_screen( _("Errors occurred during the nuke phase."));1219 log_to_screen("Errors occurred during the nuke phase."); 1220 1220 } else if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "RESTORE")) // Bruno's thing 1221 1221 { 1222 1222 log_to_screen 1223 ( _("PC was restored successfully. Thank you for using Mondo Rescue."));1223 ("PC was restored successfully. Thank you for using Mondo Rescue."); 1224 1224 log_to_screen 1225 ( _("Please visit our website at http://www.mondorescue.org for more information."));1225 ("Please visit our website at http://www.mondorescue.org for more information."); 1226 1226 } else { 1227 strcpy(tmp, _(" Mondo has restored your system. Please remove the backup media and reboot.\n\nPlease visit our website at http://www.mondorescue.org for more information."));1227 strcpy(tmp," Mondo has restored your system. Please remove the backup media and reboot.\n\nPlease visit our website at http://www.mondorescue.org for more information."); 1228 1228 if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "restore") == NULL) { 1229 1229 popup_and_OK(tmp); 1230 1230 } 1231 1231 log_to_screen 1232 ( _("Mondo has restored your system. Please remove the backup media and reboot."));1232 ("Mondo has restored your system. Please remove the backup media and reboot."); 1233 1233 log_to_screen 1234 ( _("Please visit our website at http://www.mondorescue.org for more information."));1234 ("Please visit our website at http://www.mondorescue.org for more information."); 1235 1235 } 1236 1236 g_I_have_just_nuked = TRUE; … … 1281 1281 if (!g_restoring_live_from_cd) { 1282 1282 popup_and_OK 1283 ( _("Please insert tape/CD/boot floppy, then hit 'OK' to continue."));1283 ("Please insert tape/CD/boot floppy, then hit 'OK' to continue."); 1284 1284 sleep(1); 1285 1285 } … … 1293 1293 log_msg(2, "bkpinfo->isodir = %s", bkpinfo->isodir); 1294 1294 1295 open_evalcall_form( _("Thinking..."));1295 open_evalcall_form("Thinking..."); 1296 1296 1297 1297 get_cfg_file_from_archive_or_bust(bkpinfo); … … 1306 1306 save_filelist(filelist, "/tmp/selected-files.txt"); 1307 1307 strcpy(old_restpath, bkpinfo->restore_path); 1308 if (popup_and_get_string( _("Restore path"),1309 _("Restore files to where? )"),1308 if (popup_and_get_string("Restore path", 1309 "Restore files to where? )", 1310 1310 bkpinfo->restore_path, MAX_STR_LEN / 4)) { 1311 1311 iamhere("Restoring everything"); … … 1403 1403 1404 1404 if (!(fin = fopen(slice_fname(bigfileno, 0, ARCHIVES_PATH, ""), "r"))) { 1405 log_to_screen( _("Cannot even open bigfile's info file"));1405 log_to_screen("Cannot even open bigfile's info file"); 1406 1406 return (1); 1407 1407 } … … 1516 1516 log_msg(3, "file_to_openout = %s", file_to_openout); 1517 1517 if (!(fout = fopen(file_to_openout, "w"))) { 1518 log_to_screen( _("Cannot openout outfile_fname - hard disk full?"));1518 log_to_screen("Cannot openout outfile_fname - hard disk full?"); 1519 1519 return (1); 1520 1520 } … … 1539 1539 g_current_media_number, sliceno); 1540 1540 log_msg(2, tmp); 1541 sprintf(tmp, _("Restoring from %s #%d"),1541 sprintf(tmp, "Restoring from %s #%d", 1542 1542 media_descriptor_string(bkpinfo->backup_media_type), 1543 1543 g_current_media_number); 1544 1544 log_to_screen(tmp); 1545 1545 insist_on_this_cd_number(bkpinfo, g_current_media_number); 1546 log_to_screen( _("Continuing to restore."));1546 log_to_screen("Continuing to restore."); 1547 1547 } else { 1548 1548 strcpy(tmp, … … 1573 1573 strcpy(suffix, ""); 1574 1574 } else { 1575 log_to_screen( _("OK, that's pretty fsck0red..."));1575 log_to_screen("OK, that's pretty fsck0red..."); 1576 1576 return (1); 1577 1577 } … … 1977 1977 filelist_name); 1978 1978 log_msg(2, 1979 "This is a bit silly (ask dev-teamto fix mondo-makefilelist, please)");1979 "This is a bit silly (ask Hugo to fix mondo-makefilelist, please)"); 1980 1980 log_msg(2, 1981 1981 "but it's non-critical. It's cosmetic. Don't worry about it."); … … 2031 2031 if (run_program_and_log_output(tmp, FALSE)) { 2032 2032 log_to_screen 2033 ( _("(compare_a_tarball) Compression program not found - oh no!"));2033 ("(compare_a_tarball) Compression program not found - oh no!"); 2034 2034 paranoid_MR_finish(1); 2035 2035 } … … 2054 2054 if (filelist_subset_fname[0] != '\0') { 2055 2055 sprintf(command, 2056 "afio -i -M 8m -b %ld -c %ld %s -w '%s'%s",2056 "afio -i -M 8m -b %ld -c %ld %s -w %s %s", 2057 2057 TAPE_BLOCK_SIZE, 2058 2058 BUFSIZE, executable, filelist_subset_fname, … … 2089 2089 if (res) { 2090 2090 log_to_screen 2091 ( _("Errors occurred while setting extended attributes"));2091 ("Errors occurred while setting extended attributes"); 2092 2092 } else { 2093 2093 log_msg(1, "I set xattr OK"); … … 2100 2100 if (res) { 2101 2101 log_to_screen 2102 ( _("Errors occurred while setting access control lists"));2102 ("Errors occurred while setting access control lists"); 2103 2103 } else { 2104 2104 log_msg(1, "I set ACL OK"); … … 2117 2117 if (does_file_exist("/PAUSE")) { 2118 2118 popup_and_OK 2119 ( _("Press ENTER to go on. Delete /PAUSE to stop these pauses."));2119 ("Press ENTER to go on. Delete /PAUSE to stop these pauses."); 2120 2120 } 2121 2121 unlink(filelist_subset_fname); … … 2314 2314 2315 2315 if (does_file_exist("/PAUSE") && current_tarball_number >= 50) { 2316 log_to_screen( _("Paused after set %ld"), current_tarball_number);2317 popup_and_OK( _("Pausing. Press ENTER to continue."));2316 log_to_screen("Paused after set %ld", current_tarball_number); 2317 popup_and_OK("Pausing. Press ENTER to continue."); 2318 2318 } 2319 2319 … … 2378 2378 read_cfg_var(g_mondo_cfg_file, "total-slices", tmp); 2379 2379 total_slices = atol(tmp); 2380 sprintf(tmp, _("Reassembling large files "));2380 sprintf(tmp, "Reassembling large files "); 2381 2381 mvaddstr_and_log_it(g_currentY, 0, tmp); 2382 2382 if (length_of_file(BIGGIELIST) < 6) { … … 2394 2394 log_msg(2, tmp); 2395 2395 2396 open_progress_form( _("Reassembling large files"),2397 _("I am now reassembling all the large files."),2398 _("Please wait. This may take some time."),2396 open_progress_form("Reassembling large files", 2397 "I am now reassembling all the large files.", 2398 "Please wait. This may take some time.", 2399 2399 "", total_slices); 2400 2400 for (bigfileno = 0, finished = FALSE; !finished;) { … … 2417 2417 insist_on_this_cd_number(bkpinfo, 2418 2418 ++g_current_media_number); 2419 sprintf(tmp, _("Restoring from %s #%d"),2419 sprintf(tmp, "Restoring from %s #%d", 2420 2420 media_descriptor_string(bkpinfo-> 2421 2421 backup_media_type), … … 2431 2431 } else { 2432 2432 just_changed_cds = FALSE; 2433 sprintf(tmp, _("Restoring big file %ld"), bigfileno + 1);2433 sprintf(tmp, "Restoring big file %ld", bigfileno + 1); 2434 2434 update_progress_form(tmp); 2435 2435 res = … … 2460 2460 if (does_file_exist("/PAUSE")) { 2461 2461 popup_and_OK 2462 ( _("Press ENTER to go on. Delete /PAUSE to stop these pauses."));2462 ("Press ENTER to go on. Delete /PAUSE to stop these pauses."); 2463 2463 } 2464 2464 close_progress_form(); 2465 2465 if (retval) { 2466 mvaddstr_and_log_it(g_currentY++, 74, _("Errors."));2466 mvaddstr_and_log_it(g_currentY++, 74, "Errors."); 2467 2467 } else { 2468 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));2468 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 2469 2469 } 2470 2470 paranoid_free(xattr_fname); … … 2514 2514 assert(bkpinfo != NULL); 2515 2515 2516 mvaddstr_and_log_it(g_currentY, 0, _("Restoring from archives"));2516 mvaddstr_and_log_it(g_currentY, 0, "Restoring from archives"); 2517 2517 log_msg(2, 2518 2518 "Insisting on 1st CD, so that I can have a look at LAST-FILELIST-NUMBER"); … … 2524 2524 read_cfg_var(g_mondo_cfg_file, "last-filelist-number", tmp); 2525 2525 max_val = atol(tmp) + 1; 2526 sprintf(progress_str, _("Restoring from %s #%d"),2526 sprintf(progress_str, "Restoring from %s #%d", 2527 2527 media_descriptor_string(bkpinfo->backup_media_type), 2528 2528 g_current_media_number); 2529 2529 log_to_screen(progress_str); 2530 open_progress_form( _("Restoring from archives"),2531 _("Restoring data from the archives."),2532 _("Please wait. This may take some time."),2530 open_progress_form("Restoring from archives", 2531 "Restoring data from the archives.", 2532 "Please wait. This may take some time.", 2533 2533 progress_str, max_val); 2534 2534 for (;;) { … … 2556 2556 if (current_tarball_number == 0) { 2557 2557 log_to_screen 2558 ( _("No tarballs. Strange. Maybe you only backed up freakin' big files?"));2558 ("No tarballs. Strange. Maybe you only backed up freakin' big files?"); 2559 2559 return (0); 2560 2560 } … … 2566 2566 } 2567 2567 g_current_media_number++; 2568 sprintf(progress_str, _("Restoring from %s #%d"),2568 sprintf(progress_str, "Restoring from %s #%d", 2569 2569 media_descriptor_string(bkpinfo->backup_media_type), 2570 2570 g_current_media_number); 2571 2571 log_to_screen(progress_str); 2572 2572 } else { 2573 sprintf(progress_str, _("Restoring from fileset #%ld on %s #%d"),2573 sprintf(progress_str, "Restoring from fileset #%ld on %s #%d", 2574 2574 current_tarball_number, 2575 2575 media_descriptor_string(bkpinfo->backup_media_type), … … 2583 2583 filelist); 2584 2584 } 2585 sprintf(tmp, _("%s #%d, fileset #%ld - restore "),2585 sprintf(tmp, "%s #%d, fileset #%ld - restore ", 2586 2586 media_descriptor_string(bkpinfo->backup_media_type), 2587 2587 g_current_media_number, current_tarball_number); 2588 2588 if (res) { 2589 strcat(tmp, _("reported errors"));2589 strcat(tmp, "reported errors"); 2590 2590 } else if (attempts > 1) { 2591 strcat(tmp, _("succeeded"));2591 strcat(tmp, "succeeded"); 2592 2592 } else { 2593 strcat(tmp, _("succeeded"));2593 strcat(tmp, "succeeded"); 2594 2594 } 2595 2595 if (attempts > 1) { 2596 sprintf(tmp + strlen(tmp), _(" (%d attempts) - review logs"),2596 sprintf(tmp + strlen(tmp), " (%d attempts) - review logs", 2597 2597 attempts); 2598 2598 } … … 2609 2609 close_progress_form(); 2610 2610 if (retval) { 2611 mvaddstr_and_log_it(g_currentY++, 74, _("Errors."));2611 mvaddstr_and_log_it(g_currentY++, 74, "Errors."); 2612 2612 } else { 2613 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));2613 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 2614 2614 } 2615 2615 paranoid_free(tmp); … … 2694 2694 noof_biggiefiles); 2695 2695 log_msg(2, tmp); 2696 open_progress_form( _("Reassembling large files"),2697 _("I am now reassembling all the large files."),2698 _("Please wait. This may take some time."),2696 open_progress_form("Reassembling large files", 2697 "I am now reassembling all the large files.", 2698 "Please wait. This may take some time.", 2699 2699 "", total_slices); 2700 2700 … … 2716 2716 p++; 2717 2717 } 2718 sprintf(tmp, _("Restoring big file %ld (%lld K)"),2718 sprintf(tmp, "Restoring big file %ld (%lld K)", 2719 2719 current_bigfile_number + 1, biggie_size / 1024); 2720 2720 update_progress_form(tmp); … … 2767 2767 if (does_file_exist("/PAUSE")) { 2768 2768 popup_and_OK 2769 ( _("Press ENTER to go on. Delete /PAUSE to stop these pauses."));2769 ("Press ENTER to go on. Delete /PAUSE to stop these pauses."); 2770 2770 } 2771 2771 2772 2772 close_progress_form(); 2773 2773 if (retval) { 2774 mvaddstr_and_log_it(g_currentY++, 74, _("Errors."));2774 mvaddstr_and_log_it(g_currentY++, 74, "Errors."); 2775 2775 } else { 2776 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));2776 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 2777 2777 } 2778 2778 paranoid_free(biggies_whose_EXATs_we_should_set); … … 2830 2830 malloc_string(xattr_fname); 2831 2831 malloc_string(acl_fname); 2832 mvaddstr_and_log_it(g_currentY, 0, _("Restoring from archives"));2832 mvaddstr_and_log_it(g_currentY, 0, "Restoring from archives"); 2833 2833 read_cfg_var(g_mondo_cfg_file, "last-filelist-number", tmp); 2834 2834 max_val = atol(tmp) + 1; … … 2838 2838 run_program_and_log_output("pwd", 5); 2839 2839 2840 sprintf(progress_str, _("Restoring from media #%d"),2840 sprintf(progress_str, "Restoring from media #%d", 2841 2841 g_current_media_number); 2842 2842 log_to_screen(progress_str); 2843 open_progress_form( _("Restoring from archives"),2844 _("Restoring data from the archives."),2845 _("Please wait. This may take some time."),2843 open_progress_form("Restoring from archives", 2844 "Restoring data from the archives.", 2845 "Please wait. This may take some time.", 2846 2846 progress_str, max_val); 2847 2847 … … 2877 2877 } 2878 2878 sprintf(tmp, 2879 _("Restoring from fileset #%ld (name=%s, size=%ld K)"),2879 "Restoring from fileset #%ld (name=%s, size=%ld K)", 2880 2880 current_afioball_number, tmp_fname, (long) tmp_size >> 10); 2881 2881 res = … … 2886 2886 retval += res; 2887 2887 if (res) { 2888 sprintf(tmp, _("Fileset %ld - errors occurred"),2888 sprintf(tmp, "Fileset %ld - errors occurred", 2889 2889 current_afioball_number); 2890 2890 log_to_screen(tmp); … … 2898 2898 current_afioball_number++; 2899 2899 g_current_progress++; 2900 sprintf(progress_str, _("Restoring from fileset #%ld on %s #%d"),2900 sprintf(progress_str, "Restoring from fileset #%ld on %s #%d", 2901 2901 current_afioball_number, 2902 2902 media_descriptor_string(bkpinfo->backup_media_type), … … 2910 2910 close_progress_form(); 2911 2911 if (retval) { 2912 mvaddstr_and_log_it(g_currentY++, 74, _("Errors."));2912 mvaddstr_and_log_it(g_currentY++, 74, "Errors."); 2913 2913 } else { 2914 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));2914 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 2915 2915 } 2916 2916 paranoid_free(tmp); … … 2963 2963 if (!find_home_of_exe("petris") && !g_text_mode) { 2964 2964 newtDrawRootText(0, g_noof_rows - 2, 2965 _("Press ALT-<left cursor> twice to play Petris :-) "));2965 "Press ALT-<left cursor> twice to play Petris :-) "); 2966 2966 newtRefresh(); 2967 2967 } 2968 mvaddstr_and_log_it(g_currentY, 0, _("Preparing to read your archives"));2968 mvaddstr_and_log_it(g_currentY, 0, "Preparing to read your archives"); 2969 2969 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 2970 2970 mount_cdrom(bkpinfo); 2971 2971 mvaddstr_and_log_it(g_currentY++, 0, 2972 _("Restoring OS and data from streaming media"));2972 "Restoring OS and data from streaming media"); 2973 2973 if (bkpinfo->backup_media_type == cdstream) { 2974 2974 openin_cdstream(bkpinfo); … … 2987 2987 } else { 2988 2988 mvaddstr_and_log_it(g_currentY++, 0, 2989 _("Restoring OS and data from CD "));2989 "Restoring OS and data from CD "); 2990 2990 mount_cdrom(bkpinfo); 2991 2991 resA = restore_all_tarballs_from_CD(bkpinfo, filelist); … … 2994 2994 chdir(cwd); 2995 2995 if (resA + resB) { 2996 log_to_screen( _("Errors occurred while data was being restored."));2996 log_to_screen("Errors occurred while data was being restored."); 2997 2997 } 2998 2998 if (length_of_file("/etc/raidtab") > 0) { … … 3105 3105 retval++; 3106 3106 log_to_screen 3107 ( _("Error(s) occurred while processing filelist and wildcard"));3107 ("Error(s) occurred while processing filelist and wildcard"); 3108 3108 } 3109 3109 iamhere("FIXME"); … … 3200 3200 * * 3201 3201 **************************************************************************/ 3202 3203 #ifdef ENABLE_NLS3204 setlocale(LC_ALL, "");3205 (void) textdomain("mondo");3206 #endif3207 3208 3202 if (getuid() != 0) { 3209 fprintf(stderr, _("Please run as root.\n"));3203 fprintf(stderr, "Please run as root.\r\n"); 3210 3204 exit(127); 3211 3205 } … … 3351 3345 strcpy(bkpinfo->restore_path, "/tmp/TESTING"); 3352 3346 bkpinfo->backup_media_type = dvd; 3353 open_progress_form( _("Reassembling /dev/hda1"),3354 _("Shark is a bit of a silly person."),3355 _("Please wait. This may take some time."),3347 open_progress_form("Reassembling /dev/hda1", 3348 "Shark is a bit of a silly person.", 3349 "Please wait. This may take some time.", 3356 3350 "", 1999); 3357 3351 system("rm -Rf /tmp/*pih*"); … … 3429 3423 retval = run_grub(FALSE, "/dev/hda"); 3430 3424 if (retval) { 3431 log_to_screen( _("Failed to write Master Boot Record"));3425 log_to_screen("Failed to write Master Boot Record"); 3432 3426 } 3433 3427 paranoid_MR_finish(0); … … 3440 3434 if (argc != 1) { 3441 3435 popup_and_OK 3442 ( _("Live mode doesn't support command-line parameters yet."));3436 ("Live mode doesn't support command-line parameters yet."); 3443 3437 paranoid_MR_finish(1); 3444 3438 // return(1); … … 3472 3466 log_msg(2, "FYI, MOUNTLIST_FNAME = %s ", g_mountlist_fname); 3473 3467 if (argc == 3 && strcmp(argv[1], "--monitas-memorex") == 0) { 3474 log_to_screen( _("Uh, that hasn't been implemented yet."));3468 log_to_screen("Uh, that hasn't been implemented yet."); 3475 3469 paranoid_MR_finish(1); 3476 3470 } … … 3501 3495 if (retval) { 3502 3496 log_to_screen 3503 ( _("Warning - load_raidtab_into_raidlist returned an error"));3497 ("Warning - load_raidtab_into_raidlist returned an error"); 3504 3498 } 3505 3499 … … 3555 3549 } 3556 3550 if (retval) { 3557 log_to_screen( _("Failed to write Master Boot Record"));3551 log_to_screen("Failed to write Master Boot Record"); 3558 3552 } 3559 3553 } else if (argc == 2 && strcmp(argv[1], "--isonuke") == 0) { … … 3561 3555 retval = iso_mode(bkpinfo, mountlist, raidlist, TRUE); 3562 3556 } else if (argc != 1) { 3563 log_to_screen( _("Invalid paremeters"));3557 log_to_screen("Invalid paremeters"); 3564 3558 paranoid_MR_finish(1); 3565 3559 } else { … … 3573 3567 if (does_file_exist("/tmp/changed.files")) { 3574 3568 log_to_screen 3575 ( _("See /tmp/changed.files for list of files that have changed."));3569 ("See /tmp/changed.files for list of files that have changed."); 3576 3570 } 3577 3571 mvaddstr_and_log_it(g_currentY++, 3578 3572 0, 3579 _("Run complete. Errors were reported. Please review the logfile."));3573 "Run complete. Errors were reported. Please review the logfile."); 3580 3574 } else { 3581 3575 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 3582 3576 mvaddstr_and_log_it(g_currentY++, 3583 3577 0, 3584 _("Run complete. Please remove floppy/CD/media and reboot."));3578 "Run complete. Please remove floppy/CD/media and reboot."); 3585 3579 } else { 3586 3580 run_program_and_log_output("sync", FALSE); … … 3603 3597 mvaddstr_and_log_it(g_currentY++, 3604 3598 0, 3605 _("Run complete. Please remove media and reboot."));3599 "Run complete. Please remove media and reboot."); 3606 3600 } 3607 3601 } … … 3613 3607 if (mount_all_devices(mountlist, TRUE)) { 3614 3608 log_to_screen 3615 ( _("Unable to re-mount partitions for post-nuke stuff"));3609 ("Unable to re-mount partitions for post-nuke stuff"); 3616 3610 } else { 3617 3611 log_msg(1, "Re-mounted partitions for post-nuke stuff"); … … 3646 3640 run_program_and_log_output(tmp, FALSE); 3647 3641 log_to_screen 3648 ( _("Restore log copied to /tmp/mondo-restore.log on your hard disk"));3642 ("Restore log copied to /tmp/mondo-restore.log on your hard disk"); 3649 3643 sprintf(tmp, 3650 _("Mondo-restore is exiting (retval=%d) "),3644 "Mondo-restore is exiting (retval=%d) ", 3651 3645 retval); 3652 3646 log_to_screen(tmp);
Note:
See TracChangeset
for help on using the changeset viewer.