Changeset 507 in MondoRescue for trunk/mondo/mondo/mondorestore/mondo-rstr-tools.c
- Timestamp:
- Apr 30, 2006, 2:04:16 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/mondorestore/mondo-rstr-tools.c
r426 r507 225 225 226 226 asprintf(&question, 227 "Should I restore the image of %s ?", incoming);227 _("Should I restore the image of %s ?", incoming)); 228 228 229 229 if (ask_me_yes_or_no(question)) { … … 337 337 while (get_cfg_file_from_archive(bkpinfo)) { 338 338 if (!ask_me_yes_or_no 339 ( "Failed to find config file/archives. Choose another source?"))339 (_("Failed to find config file/archives. Choose another source?"))) 340 340 { 341 341 fatal_error("Could not find config file/archives. Aborting."); … … 441 441 442 442 if (is_this_device_mounted(g_isodir_device)) { 443 log_to_screen( "WARNING - isodir is already mounted");443 log_to_screen(_("WARNING - isodir is already mounted")); 444 444 already_mounted = TRUE; 445 445 } else { … … 458 458 if (run_program_and_log_output(mount_isodir_command, FALSE)) { 459 459 popup_and_OK 460 ( "Cannot mount the device where the ISO files are stored.");460 (_("Cannot mount the device where the ISO files are stored.")); 461 461 return (1); 462 462 } 463 463 log_to_screen 464 ( "I have mounted the device where the ISO files are stored.");464 (_("I have mounted the device where the ISO files are stored.")); 465 465 } 466 466 if (!IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { … … 473 473 if (i < 0) { 474 474 popup_and_OK 475 ( "Cannot find ISO images in the directory you specified.");475 (_("Cannot find ISO images in the directory you specified.")); 476 476 retval = 1; 477 477 } … … 599 599 these_failed[0] = '\0'; 600 600 601 mvaddstr_and_log_it(g_currentY, 0, "Mounting devices ");602 open_progress_form( "Mounting devices",603 "I am now mounting all the drives.",604 "This should not take long.",601 mvaddstr_and_log_it(g_currentY, 0, _("Mounting devices ")); 602 open_progress_form(_("Mounting devices"), 603 _("I am now mounting all the drives."), 604 _("This should not take long."), 605 605 "", mountlist->entries); 606 606 … … 610 610 "Again with the /proc - why is this in your mountlist?"); 611 611 } else if (is_this_device_mounted(mountlist->el[lino].device)) { 612 sprintf(tmp, "%s is already mounted",612 sprintf(tmp, _("%s is already mounted"), 613 613 mountlist->el[lino].device); 614 614 log_to_screen(tmp); … … 639 639 if (g_partition_table_locked_up > 0) { 640 640 log_to_screen 641 ( "fdisk's ictol() call to refresh its copy of the partition table causes the kernel to");641 (_("fdisk's ioctl() call to refresh its copy of the partition table causes the kernel to")); 642 642 log_to_screen 643 ( "lock up the partition table. You might have to reboot and use Interactive Mode to");643 (_("lock up the partition table. You might have to reboot and use Interactive Mode to")); 644 644 log_to_screen 645 ( "format and restore *without* partitioning first. Sorry for the inconvenience.");646 } 647 sprintf(tmp, "Could not mount devices %s- shall I abort?",645 (_("format and restore *without* partitioning first. Sorry for the inconvenience.")); 646 } 647 sprintf(tmp, _("Could not mount devices %s- shall I abort?"), 648 648 these_failed); 649 649 if (!ask_me_yes_or_no(tmp)) { 650 650 retval = 0; 651 651 log_to_screen 652 ( "Continuing, although some devices failed to be mounted");653 mvaddstr_and_log_it(g_currentY++, 74, "Done.");652 (_("Continuing, although some devices failed to be mounted")); 653 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 654 654 } else { 655 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");655 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 656 656 log_to_screen 657 ( "Unable to mount some or all of your partitions.");657 (_("Unable to mount some or all of your partitions.")); 658 658 } 659 659 } else { 660 log_to_screen( "All partitions were mounted OK.");661 mvaddstr_and_log_it(g_currentY++, 74, "Done.");660 log_to_screen(_("All partitions were mounted OK.")); 661 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 662 662 } 663 663 run_program_and_log_output("df -P -m", 3); … … 1322 1322 if (am_I_in_disaster_recovery_mode() 1323 1323 && 1324 ask_me_yes_or_no( "Do you want to retrieve the mountlist as well?"))1324 ask_me_yes_or_no(_("Do you want to retrieve the mountlist as well?"))) 1325 1325 { 1326 1326 // sprintf(command, "cp -f tmp/mountlist.txt /tmp"); … … 1348 1348 1349 1349 case 0: 1350 log_to_screen( "Pre-processing filelist");1350 log_to_screen(("Pre-processing filelist")); 1351 1351 if (!does_file_exist(g_biggielist_txt)) { 1352 1352 sprintf(command, "> %s", g_biggielist_txt); … … 1360 1360 1361 1361 default: 1362 open_evalcall_form( "Pre-processing filelist");1362 open_evalcall_form(_("Pre-processing filelist")); 1363 1363 while (!waitpid(pid, (int *) 0, WNOHANG)) { 1364 1364 usleep(100000); … … 1373 1373 unlink(g_filelist_full); 1374 1374 if (g_text_mode) { 1375 printf( "Restore which directory? --> ");1375 printf(_("Restore which directory? --> ")); 1376 1376 fgets(tmp, sizeof(tmp), stdin); 1377 1377 toggle_path_selection(filelist, tmp, TRUE); … … 1506 1506 else { 1507 1507 log_to_screen 1508 ( "Unable to determine type of boot loader. Defaulting to LILO.");1508 (_("Unable to determine type of boot loader. Defaulting to LILO.")); 1509 1509 res = run_lilo(offer_to_hack_scripts); 1510 1510 } … … 1512 1512 retval += res; 1513 1513 if (res) { 1514 log_to_screen( "Your boot loader returned an error");1514 log_to_screen(_("Your boot loader returned an error")); 1515 1515 } else { 1516 log_to_screen( "Your boot loader ran OK");1516 log_to_screen(_("Your boot loader ran OK")); 1517 1517 } 1518 1518 paranoid_free(device); … … 1595 1595 } 1596 1596 if (offer_to_run_stabgrub 1597 && ask_me_yes_or_no( "Did you change the mountlist?"))1597 && ask_me_yes_or_no(_("Did you change the mountlist?"))) 1598 1598 /* interactive mode */ 1599 1599 { 1600 1600 mvaddstr_and_log_it(g_currentY, 1601 1601 0, 1602 "Modifying fstab and grub.conf, and running GRUB... ");1602 _("Modifying fstab and grub.conf, and running GRUB... ")); 1603 1603 for (done = FALSE; !done;) { 1604 popup_and_get_string( "Boot device",1605 "Please confirm/enter the boot device. If in doubt, try /dev/hda",1604 popup_and_get_string(_("Boot device"), 1605 _("Please confirm/enter the boot device. If in doubt, try /dev/hda"), 1606 1606 boot_device, MAX_STR_LEN / 4); 1607 1607 sprintf(command, "stabgrub-me %s", boot_device); … … 1609 1609 if (res) { 1610 1610 popup_and_OK 1611 ( "GRUB installation failed. Please install manually using 'grub-install' or similar command. You are now chroot()'ed to your restored system. Please type 'exit' when you are done.");1611 (_("GRUB installation failed. Please install manually using 'grub-install' or similar command. You are now chroot()'ed to your restored system. Please type 'exit' when you are done.")); 1612 1612 newtSuspend(); 1613 1613 system("chroot " MNT_RESTORING); 1614 1614 newtResume(); 1615 popup_and_OK( "Thank you.");1615 popup_and_OK(_("Thank you.")); 1616 1616 } else { 1617 1617 done = TRUE; 1618 1618 } 1619 popup_and_OK( "You will now edit fstab and grub.conf");1619 popup_and_OK(_("You will now edit fstab and grub.conf")); 1620 1620 if (!g_text_mode) { 1621 1621 newtSuspend(); … … 1634 1634 mvaddstr_and_log_it(g_currentY, 1635 1635 0, 1636 "Running GRUB... ");1636 _("Running GRUB... ")); 1637 1637 iamhere(command); 1638 1638 res = run_program_and_log_output(command, 1); 1639 1639 if (res) { 1640 1640 popup_and_OK 1641 ( "Because of bugs in GRUB's own installer, GRUB was not installed properly. Please install the boot loader manually now, using this chroot()'ed shell prompt. Type 'exit' when you have finished.");1641 (_("Because of bugs in GRUB's own installer, GRUB was not installed properly. Please install the boot loader manually now, using this chroot()'ed shell prompt. Type 'exit' when you have finished.")); 1642 1642 newtSuspend(); 1643 1643 system("chroot " MNT_RESTORING); 1644 1644 newtResume(); 1645 popup_and_OK( "Thank you.");1645 popup_and_OK(_("Thank you.")); 1646 1646 } 1647 1647 } 1648 1648 if (res) { 1649 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");1649 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1650 1650 log_to_screen 1651 ( "GRUB ran w/error(s). See /tmp/mondo-restore.log for more info.");1651 (_("GRUB ran w/error(s). See /tmp/mondo-restore.log for more info.")); 1652 1652 log_msg(1, "Type:-"); 1653 1653 log_msg(1, " mount-me"); … … 1660 1660 "If you're really stuck, please e-mail the mailing list."); 1661 1661 } else { 1662 mvaddstr_and_log_it(g_currentY++, 74, "Done.");1662 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 1663 1663 } 1664 1664 paranoid_free(rootdev); … … 1698 1698 strcpy(editor, find_my_editor()); 1699 1699 if (offer_to_run_stabelilo 1700 && ask_me_yes_or_no( "Did you change the mountlist?"))1700 && ask_me_yes_or_no(_("Did you change the mountlist?"))) 1701 1701 1702 1702 /* interactive mode */ … … 1704 1704 mvaddstr_and_log_it(g_currentY, 1705 1705 0, 1706 "Modifying fstab and elilo.conf... ");1706 _("Modifying fstab and elilo.conf... ")); 1707 1707 sprintf(command, "stabelilo-me"); 1708 1708 res = run_program_and_log_output(command, 3); 1709 1709 if (res) { 1710 1710 popup_and_OK 1711 ( "You will now edit fstab and elilo.conf, to make sure they match your new mountlist.");1711 (_("You will now edit fstab and elilo.conf, to make sure they match your new mountlist.")); 1712 1712 for (done = FALSE; !done;) { 1713 1713 if (!g_text_mode) { … … 1723 1723 } 1724 1724 // newtCls(); 1725 if (ask_me_yes_or_no( "Edit them again?")) {1725 if (ask_me_yes_or_no(_("Edit them again?"))) { 1726 1726 continue; 1727 1727 } … … 1729 1729 } 1730 1730 } else { 1731 log_to_screen( "elilo.conf and fstab were modified OK");1731 log_to_screen(_("elilo.conf and fstab were modified OK")); 1732 1732 } 1733 1733 } else … … 1773 1773 strcpy(editor, find_my_editor()); 1774 1774 if (offer_to_run_stablilo 1775 && ask_me_yes_or_no( "Did you change the mountlist?"))1775 && ask_me_yes_or_no(_("Did you change the mountlist?"))) 1776 1776 1777 1777 /* interactive mode */ … … 1779 1779 mvaddstr_and_log_it(g_currentY, 1780 1780 0, 1781 "Modifying fstab and lilo.conf, and running LILO... ");1781 _("Modifying fstab and lilo.conf, and running LILO... ")); 1782 1782 sprintf(command, "stablilo-me"); 1783 1783 res = run_program_and_log_output(command, 3); 1784 1784 if (res) { 1785 1785 popup_and_OK 1786 ( "You will now edit fstab and lilo.conf, to make sure they match your new mountlist.");1786 (_("You will now edit fstab and lilo.conf, to make sure they match your new mountlist.")); 1787 1787 for (done = FALSE; !done;) { 1788 1788 if (!g_text_mode) { … … 1797 1797 } 1798 1798 // newtCls(); 1799 if (ask_me_yes_or_no( "Edit them again?")) {1799 if (ask_me_yes_or_no(_("Edit them again?"))) { 1800 1800 continue; 1801 1801 } … … 1811 1811 done = 1812 1812 ask_me_yes_or_no 1813 ( "LILO failed. Re-edit system files?");1813 (_("LILO failed. Re-edit system files?")); 1814 1814 } else { 1815 1815 done = TRUE; … … 1817 1817 } 1818 1818 } else { 1819 log_to_screen( "lilo.conf and fstab were modified OK");1819 log_to_screen(_("lilo.conf and fstab were modified OK")); 1820 1820 } 1821 1821 } else … … 1824 1824 mvaddstr_and_log_it(g_currentY, 1825 1825 0, 1826 "Running LILO... ");1826 _("Running LILO... ")); 1827 1827 res = 1828 1828 run_program_and_log_output("chroot " MNT_RESTORING " lilo -L", … … 1834 1834 } 1835 1835 if (res) { 1836 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");1836 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1837 1837 log_to_screen 1838 ( "Failed to re-jig fstab and/or lilo. Edit/run manually, please.");1838 (_("Failed to re-jig fstab and/or lilo. Edit/run manually, please.")); 1839 1839 } else { 1840 mvaddstr_and_log_it(g_currentY++, 74, "Done.");1840 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 1841 1841 } 1842 1842 } … … 1886 1886 1887 1887 if (offer_to_hack_scripts 1888 && ask_me_yes_or_no( "Did you change the mountlist?"))1888 && ask_me_yes_or_no(_("Did you change the mountlist?"))) 1889 1889 /* interactive mode */ 1890 1890 { 1891 1891 mvaddstr_and_log_it(g_currentY, 0, 1892 "Modifying fstab and restoring MBR... ");1892 _("Modifying fstab and restoring MBR... ")); 1893 1893 for (done = FALSE; !done;) { 1894 1894 if (!run_program_and_log_output("which vi", FALSE)) { 1895 popup_and_OK( "You will now edit fstab");1895 popup_and_OK(_("You will now edit fstab")); 1896 1896 if (!g_text_mode) { 1897 1897 newtSuspend(); … … 1904 1904 // newtCls(); 1905 1905 } 1906 popup_and_get_string( "Boot device",1907 "Please confirm/enter the boot device. If in doubt, try /dev/hda",1906 popup_and_get_string(_("Boot device"), 1907 _("Please confirm/enter the boot device. If in doubt, try /dev/hda"), 1908 1908 boot_device, MAX_STR_LEN / 4); 1909 1909 sprintf(command, "stabraw-me %s", boot_device); 1910 1910 res = run_program_and_log_output(command, 3); 1911 1911 if (res) { 1912 done = ask_me_yes_or_no( "Modifications failed. Re-try?");1912 done = ask_me_yes_or_no(_("Modifications failed. Re-try?")); 1913 1913 } else { 1914 1914 done = TRUE; … … 1919 1919 { 1920 1920 mvaddstr_and_log_it(g_currentY, 0, 1921 "Restoring MBR... ");1921 _("Restoring MBR... ")); 1922 1922 res = run_program_and_log_output(command, 3); 1923 1923 } 1924 1924 if (res) { 1925 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");1925 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1926 1926 log_to_screen 1927 ( "MBR+fstab processed w/error(s). See /tmp/mondo-restore.log for more info.");1927 (_("MBR+fstab processed w/error(s). See /tmp/mondo-restore.log for more info.")); 1928 1928 } else { 1929 mvaddstr_and_log_it(g_currentY++, 74, "Done.");1929 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 1930 1930 } 1931 1931 paranoid_free(command); … … 2067 2067 { 2068 2068 log_to_screen 2069 ( "Mondorestore is terminating in response to a signal from the OS");2069 (_("Mondorestore is terminating in response to a signal from the OS")); 2070 2070 paranoid_MR_finish(254); 2071 2071 } … … 2089 2089 return; 2090 2090 } 2091 open_progress_form( "CAUTION",2092 "Be advised: I am about to ERASE your hard disk(s)!",2093 "You may press Ctrl+Alt+Del to abort safely.",2091 open_progress_form(_("CAUTION"), 2092 _("Be advised: I am about to ERASE your hard disk(s)!"), 2093 _("You may press Ctrl+Alt+Del to abort safely."), 2094 2094 "", 20); 2095 2095 for (i = 0; i < 20; i++) { 2096 2096 g_current_progress = i; 2097 sprintf(tmp, "You have %d seconds left to abort.", 20 - i);2097 sprintf(tmp, _("You have %d seconds left to abort."), 20 - i); 2098 2098 update_progress_form(tmp); 2099 2099 sleep(1); … … 2151 2151 2152 2152 run_program_and_log_output("df -P -m", 3); 2153 mvaddstr_and_log_it(g_currentY, 0, "Unmounting devices ");2154 open_progress_form( "Unmounting devices",2155 "Unmounting all devices that were mounted,",2156 "in preparation for the post-restoration reboot.",2153 mvaddstr_and_log_it(g_currentY, 0, _("Unmounting devices ")); 2154 open_progress_form(_("Unmounting devices"), 2155 _("Unmounting all devices that were mounted,"), 2156 _("in preparation for the post-restoration reboot."), 2157 2157 "", mountlist->entries); 2158 2158 chdir("/"); … … 2187 2187 continue; 2188 2188 } 2189 sprintf(tmp, "Unmounting device %s ", mountlist->el[lino].device);2189 sprintf(tmp, _("Unmounting device %s "), mountlist->el[lino].device); 2190 2190 2191 2191 update_progress_form(tmp); … … 2206 2206 res = run_program_and_log_output(command, 3); 2207 2207 } else { 2208 strcat(tmp, "...not mounted anyway :-) OK");2208 strcat(tmp, _("...not mounted anyway :-) OK")); 2209 2209 res = 0; 2210 2210 } 2211 2211 g_current_progress++; 2212 2212 if (res) { 2213 strcat(tmp, "...Failed");2213 strcat(tmp, _("...Failed")); 2214 2214 retval++; 2215 2215 log_to_screen(tmp); … … 2220 2220 close_progress_form(); 2221 2221 if (retval) { 2222 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");2222 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 2223 2223 } else { 2224 mvaddstr_and_log_it(g_currentY++, 74, "Done.");2224 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 2225 2225 } 2226 2226 if (retval) { 2227 log_to_screen( "Unable to unmount some of your partitions.");2227 log_to_screen(_("Unable to unmount some of your partitions.")); 2228 2228 } else { 2229 log_to_screen( "All partitions were unmounted OK.");2229 log_to_screen(_("All partitions were unmounted OK.")); 2230 2230 } 2231 2231 free(mountlist); … … 2311 2311 malloc_string(tmp); 2312 2312 log_msg(2, "gcffa --- starting"); 2313 log_to_screen( "I'm thinking...");2313 log_to_screen(_("I'm thinking...")); 2314 2314 sprintf(mountpt, "%s/mount.bootdisk", bkpinfo->tmpdir); 2315 2315 device[0] = '\0'; … … 2423 2423 2424 2424 if (!does_file_exist("tmp/mondo-restore.cfg")) { 2425 log_to_screen( "Cannot find config info on tape/CD/floppy");2425 log_to_screen(_("Cannot find config info on tape/CD/floppy")); 2426 2426 return (1); 2427 2427 } … … 2504 2504 log_msg(1, "%s not found", cfg_file); 2505 2505 log_to_screen 2506 ( "Oh dear. Unable to recover configuration file from boot disk");2506 (_("Oh dear. Unable to recover configuration file from boot disk")); 2507 2507 return (1); 2508 2508 } 2509 2509 2510 log_to_screen( "Recovered mondo-restore.cfg");2510 log_to_screen(_("Recovered mondo-restore.cfg")); 2511 2511 if (!does_file_exist(MOUNTLIST_FNAME_STUB)) { 2512 log_to_screen( "...but not mountlist.txt - a pity, really...");2512 log_to_screen(_("...but not mountlist.txt - a pity, really...")); 2513 2513 } 2514 2514 /* start SAH */ … … 2580 2580 while (unfinished_mdstat_devices > 0) { 2581 2581 if (read_mdstat(mdstat, mdstat_file)) { 2582 log_to_screen( "Sorry, cannot read %s", mdstat_file);2582 log_to_screen(_("Sorry, cannot read %s"), mdstat_file); 2583 2583 return; 2584 2584 } … … 2586 2586 if (mdstat->el[i].progress < wait_for_percentage) { 2587 2587 unfinished_mdstat_devices++; 2588 sprintf(screen_message, "Sync'ing /dev/md%d",2588 sprintf(screen_message, _("Sync'ing /dev/md%d"), 2589 2589 mdstat->el[i].md); 2590 2590 open_evalcall_form(screen_message);
Note:
See TracChangeset
for help on using the changeset viewer.