Changeset 497 in MondoRescue for branches/stable/mondo/mondo/mondorestore/mondo-rstr-tools.c
- Timestamp:
- Apr 28, 2006, 12:34:03 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/mondo/mondorestore/mondo-rstr-tools.c
r425 r497 241 241 242 242 sprintf(question_ptr, 243 "Should I restore the image of %s ?", incoming_ptr);243 _("Should I restore the image of %s ?"), incoming_ptr); 244 244 245 245 if (ask_me_yes_or_no(question_ptr)) { … … 355 355 while (get_cfg_file_from_archive(bkpinfo)) { 356 356 if (!ask_me_yes_or_no 357 ( "Failed to find config file/archives. Choose another source?"))357 (_("Failed to find config file/archives. Choose another source?"))) 358 358 { 359 359 fatal_error("Could not find config file/archives. Aborting."); … … 459 459 460 460 if (is_this_device_mounted(g_isodir_device)) { 461 log_to_screen( "WARNING - isodir is already mounted");461 log_to_screen(_("WARNING - isodir is already mounted")); 462 462 already_mounted = TRUE; 463 463 } else { … … 476 476 if (run_program_and_log_output(mount_isodir_command, FALSE)) { 477 477 popup_and_OK 478 ( "Cannot mount the device where the ISO files are stored.");478 (_("Cannot mount the device where the ISO files are stored.")); 479 479 return (1); 480 480 } 481 481 log_to_screen 482 ( "I have mounted the device where the ISO files are stored.");482 (_("I have mounted the device where the ISO files are stored.")); 483 483 } 484 484 if (!IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { … … 491 491 if (i < 0) { 492 492 popup_and_OK 493 ( "Cannot find ISO images in the directory you specified.");493 (_("Cannot find ISO images in the directory you specified.")); 494 494 retval = 1; 495 495 } … … 617 617 these_failed[0] = '\0'; 618 618 619 mvaddstr_and_log_it(g_currentY, 0, "Mounting devices ");620 open_progress_form( "Mounting devices",621 "I am now mounting all the drives.",622 "This should not take long.",619 mvaddstr_and_log_it(g_currentY, 0, _("Mounting devices ")); 620 open_progress_form(_("Mounting devices"), 621 _("I am now mounting all the drives."), 622 _("This should not take long."), 623 623 "", mountlist->entries); 624 624 … … 628 628 "Again with the /proc - why is this in your mountlist?"); 629 629 } else if (is_this_device_mounted(mountlist->el[lino].device)) { 630 sprintf(tmp, "%s is already mounted",630 sprintf(tmp, _("%s is already mounted"), 631 631 mountlist->el[lino].device); 632 632 log_to_screen(tmp); … … 657 657 if (g_partition_table_locked_up > 0) { 658 658 log_to_screen 659 ( "fdisk's ictol() call to refresh its copy of the partition table causes the kernel to");659 (_("fdisk's ioctl() call to refresh its copy of the partition table causes the kernel to")); 660 660 log_to_screen 661 ( "lock up the partition table. You might have to reboot and use Interactive Mode to");661 (_("lock up the partition table. You might have to reboot and use Interactive Mode to")); 662 662 log_to_screen 663 ( "format and restore *without* partitioning first. Sorry for the inconvenience.");664 } 665 sprintf(tmp, "Could not mount devices %s- shall I abort?",663 (_("format and restore *without* partitioning first. Sorry for the inconvenience.")); 664 } 665 sprintf(tmp, _("Could not mount devices %s- shall I abort?"), 666 666 these_failed); 667 667 if (!ask_me_yes_or_no(tmp)) { 668 668 retval = 0; 669 669 log_to_screen 670 ( "Continuing, although some devices failed to be mounted");671 mvaddstr_and_log_it(g_currentY++, 74, "Done.");670 (_("Continuing, although some devices failed to be mounted")); 671 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 672 672 } else { 673 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");673 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 674 674 log_to_screen 675 ( "Unable to mount some or all of your partitions.");675 (_("Unable to mount some or all of your partitions.")); 676 676 } 677 677 } else { 678 log_to_screen( "All partitions were mounted OK.");679 mvaddstr_and_log_it(g_currentY++, 74, "Done.");678 log_to_screen(_("All partitions were mounted OK.")); 679 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 680 680 } 681 681 run_program_and_log_output("df -P -m", 3); … … 1340 1340 if (am_I_in_disaster_recovery_mode() 1341 1341 && 1342 ask_me_yes_or_no( "Do you want to retrieve the mountlist as well?"))1342 ask_me_yes_or_no(_("Do you want to retrieve the mountlist as well?"))) 1343 1343 { 1344 1344 // sprintf(command, "cp -f tmp/mountlist.txt /tmp"); … … 1366 1366 1367 1367 case 0: 1368 log_to_screen( "Pre-processing filelist");1368 log_to_screen(("Pre-processing filelist")); 1369 1369 if (!does_file_exist(g_biggielist_txt)) { 1370 1370 sprintf(command, "> %s", g_biggielist_txt); … … 1378 1378 1379 1379 default: 1380 open_evalcall_form( "Pre-processing filelist");1380 open_evalcall_form(_("Pre-processing filelist")); 1381 1381 while (!waitpid(pid, (int *) 0, WNOHANG)) { 1382 1382 usleep(100000); … … 1391 1391 unlink(g_filelist_full); 1392 1392 if (g_text_mode) { 1393 printf( "Restore which directory? --> ");1393 printf(_("Restore which directory? --> ")); 1394 1394 fgets(tmp, sizeof(tmp), stdin); 1395 1395 toggle_path_selection(filelist, tmp, TRUE); … … 1524 1524 else { 1525 1525 log_to_screen 1526 ( "Unable to determine type of boot loader. Defaulting to LILO.");1526 (_("Unable to determine type of boot loader. Defaulting to LILO.")); 1527 1527 res = run_lilo(offer_to_hack_scripts); 1528 1528 } … … 1530 1530 retval += res; 1531 1531 if (res) { 1532 log_to_screen( "Your boot loader returned an error");1532 log_to_screen(_("Your boot loader returned an error")); 1533 1533 } else { 1534 log_to_screen( "Your boot loader ran OK");1534 log_to_screen(_("Your boot loader ran OK")); 1535 1535 } 1536 1536 paranoid_free(device); … … 1613 1613 } 1614 1614 if (offer_to_run_stabgrub 1615 && ask_me_yes_or_no( "Did you change the mountlist?"))1615 && ask_me_yes_or_no(_("Did you change the mountlist?"))) 1616 1616 /* interactive mode */ 1617 1617 { 1618 1618 mvaddstr_and_log_it(g_currentY, 1619 1619 0, 1620 "Modifying fstab and grub.conf, and running GRUB... ");1620 _("Modifying fstab and grub.conf, and running GRUB... ")); 1621 1621 for (done = FALSE; !done;) { 1622 popup_and_get_string( "Boot device",1623 "Please confirm/enter the boot device. If in doubt, try /dev/hda",1622 popup_and_get_string(_("Boot device"), 1623 _("Please confirm/enter the boot device. If in doubt, try /dev/hda"), 1624 1624 boot_device, MAX_STR_LEN / 4); 1625 1625 sprintf(command, "stabgrub-me %s", boot_device); … … 1627 1627 if (res) { 1628 1628 popup_and_OK 1629 ( "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.");1629 (_("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.")); 1630 1630 newtSuspend(); 1631 1631 system("chroot " MNT_RESTORING); 1632 1632 newtResume(); 1633 popup_and_OK( "Thank you.");1633 popup_and_OK(_("Thank you.")); 1634 1634 } else { 1635 1635 done = TRUE; 1636 1636 } 1637 popup_and_OK( "You will now edit fstab and grub.conf");1637 popup_and_OK(_("You will now edit fstab and grub.conf")); 1638 1638 if (!g_text_mode) { 1639 1639 newtSuspend(); … … 1652 1652 mvaddstr_and_log_it(g_currentY, 1653 1653 0, 1654 "Running GRUB... ");1654 _("Running GRUB... ")); 1655 1655 iamhere(command); 1656 1656 res = run_program_and_log_output(command, 1); 1657 1657 if (res) { 1658 1658 popup_and_OK 1659 ( "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.");1659 (_("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.")); 1660 1660 newtSuspend(); 1661 1661 system("chroot " MNT_RESTORING); 1662 1662 newtResume(); 1663 popup_and_OK( "Thank you.");1663 popup_and_OK(_("Thank you.")); 1664 1664 } 1665 1665 } 1666 1666 if (res) { 1667 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");1667 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1668 1668 log_to_screen 1669 ( "GRUB ran w/error(s). See /tmp/mondo-restore.log for more info.");1669 (_("GRUB ran w/error(s). See /tmp/mondo-restore.log for more info.")); 1670 1670 log_msg(1, "Type:-"); 1671 1671 log_msg(1, " mount-me"); … … 1678 1678 "If you're really stuck, please e-mail the mailing list."); 1679 1679 } else { 1680 mvaddstr_and_log_it(g_currentY++, 74, "Done.");1680 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 1681 1681 } 1682 1682 paranoid_free(rootdev); … … 1716 1716 strcpy(editor, find_my_editor()); 1717 1717 if (offer_to_run_stabelilo 1718 && ask_me_yes_or_no( "Did you change the mountlist?"))1718 && ask_me_yes_or_no(_("Did you change the mountlist?"))) 1719 1719 1720 1720 /* interactive mode */ … … 1722 1722 mvaddstr_and_log_it(g_currentY, 1723 1723 0, 1724 "Modifying fstab and elilo.conf... ");1724 _("Modifying fstab and elilo.conf... ")); 1725 1725 sprintf(command, "stabelilo-me"); 1726 1726 res = run_program_and_log_output(command, 3); 1727 1727 if (res) { 1728 1728 popup_and_OK 1729 ( "You will now edit fstab and elilo.conf, to make sure they match your new mountlist.");1729 (_("You will now edit fstab and elilo.conf, to make sure they match your new mountlist.")); 1730 1730 for (done = FALSE; !done;) { 1731 1731 if (!g_text_mode) { … … 1741 1741 } 1742 1742 // newtCls(); 1743 if (ask_me_yes_or_no( "Edit them again?")) {1743 if (ask_me_yes_or_no(_("Edit them again?"))) { 1744 1744 continue; 1745 1745 } … … 1747 1747 } 1748 1748 } else { 1749 log_to_screen( "elilo.conf and fstab were modified OK");1749 log_to_screen(_("elilo.conf and fstab were modified OK")); 1750 1750 } 1751 1751 } else … … 1791 1791 strcpy(editor, find_my_editor()); 1792 1792 if (offer_to_run_stablilo 1793 && ask_me_yes_or_no( "Did you change the mountlist?"))1793 && ask_me_yes_or_no(_("Did you change the mountlist?"))) 1794 1794 1795 1795 /* interactive mode */ … … 1797 1797 mvaddstr_and_log_it(g_currentY, 1798 1798 0, 1799 "Modifying fstab and lilo.conf, and running LILO... ");1799 _("Modifying fstab and lilo.conf, and running LILO... ")); 1800 1800 sprintf(command, "stablilo-me"); 1801 1801 res = run_program_and_log_output(command, 3); 1802 1802 if (res) { 1803 1803 popup_and_OK 1804 ( "You will now edit fstab and lilo.conf, to make sure they match your new mountlist.");1804 (_("You will now edit fstab and lilo.conf, to make sure they match your new mountlist.")); 1805 1805 for (done = FALSE; !done;) { 1806 1806 if (!g_text_mode) { … … 1815 1815 } 1816 1816 // newtCls(); 1817 if (ask_me_yes_or_no( "Edit them again?")) {1817 if (ask_me_yes_or_no(_("Edit them again?"))) { 1818 1818 continue; 1819 1819 } … … 1829 1829 done = 1830 1830 ask_me_yes_or_no 1831 ( "LILO failed. Re-edit system files?");1831 (_("LILO failed. Re-edit system files?")); 1832 1832 } else { 1833 1833 done = TRUE; … … 1835 1835 } 1836 1836 } else { 1837 log_to_screen( "lilo.conf and fstab were modified OK");1837 log_to_screen(_("lilo.conf and fstab were modified OK")); 1838 1838 } 1839 1839 } else … … 1842 1842 mvaddstr_and_log_it(g_currentY, 1843 1843 0, 1844 "Running LILO... ");1844 _("Running LILO... ")); 1845 1845 res = 1846 1846 run_program_and_log_output("chroot " MNT_RESTORING " lilo -L", … … 1852 1852 } 1853 1853 if (res) { 1854 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");1854 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1855 1855 log_to_screen 1856 ( "Failed to re-jig fstab and/or lilo. Edit/run manually, please.");1856 (_("Failed to re-jig fstab and/or lilo. Edit/run manually, please.")); 1857 1857 } else { 1858 mvaddstr_and_log_it(g_currentY++, 74, "Done.");1858 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 1859 1859 } 1860 1860 } … … 1904 1904 1905 1905 if (offer_to_hack_scripts 1906 && ask_me_yes_or_no( "Did you change the mountlist?"))1906 && ask_me_yes_or_no(_("Did you change the mountlist?"))) 1907 1907 /* interactive mode */ 1908 1908 { 1909 1909 mvaddstr_and_log_it(g_currentY, 0, 1910 "Modifying fstab and restoring MBR... ");1910 _("Modifying fstab and restoring MBR... ")); 1911 1911 for (done = FALSE; !done;) { 1912 1912 if (!run_program_and_log_output("which vi", FALSE)) { 1913 popup_and_OK( "You will now edit fstab");1913 popup_and_OK(_("You will now edit fstab")); 1914 1914 if (!g_text_mode) { 1915 1915 newtSuspend(); … … 1922 1922 // newtCls(); 1923 1923 } 1924 popup_and_get_string( "Boot device",1925 "Please confirm/enter the boot device. If in doubt, try /dev/hda",1924 popup_and_get_string(_("Boot device"), 1925 _("Please confirm/enter the boot device. If in doubt, try /dev/hda"), 1926 1926 boot_device, MAX_STR_LEN / 4); 1927 1927 sprintf(command, "stabraw-me %s", boot_device); 1928 1928 res = run_program_and_log_output(command, 3); 1929 1929 if (res) { 1930 done = ask_me_yes_or_no( "Modifications failed. Re-try?");1930 done = ask_me_yes_or_no(_("Modifications failed. Re-try?")); 1931 1931 } else { 1932 1932 done = TRUE; … … 1937 1937 { 1938 1938 mvaddstr_and_log_it(g_currentY, 0, 1939 "Restoring MBR... ");1939 _("Restoring MBR... ")); 1940 1940 res = run_program_and_log_output(command, 3); 1941 1941 } 1942 1942 if (res) { 1943 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");1943 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1944 1944 log_to_screen 1945 ( "MBR+fstab processed w/error(s). See /tmp/mondo-restore.log for more info.");1945 (_("MBR+fstab processed w/error(s). See /tmp/mondo-restore.log for more info.")); 1946 1946 } else { 1947 mvaddstr_and_log_it(g_currentY++, 74, "Done.");1947 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 1948 1948 } 1949 1949 paranoid_free(command); … … 2085 2085 { 2086 2086 log_to_screen 2087 ( "Mondorestore is terminating in response to a signal from the OS");2087 (_("Mondorestore is terminating in response to a signal from the OS")); 2088 2088 paranoid_MR_finish(254); 2089 2089 } … … 2107 2107 return; 2108 2108 } 2109 open_progress_form( "CAUTION",2110 "Be advised: I am about to ERASE your hard disk(s)!",2111 "You may press Ctrl+Alt+Del to abort safely.",2109 open_progress_form(_("CAUTION"), 2110 _("Be advised: I am about to ERASE your hard disk(s)!"), 2111 _("You may press Ctrl+Alt+Del to abort safely."), 2112 2112 "", 20); 2113 2113 for (i = 0; i < 20; i++) { 2114 2114 g_current_progress = i; 2115 sprintf(tmp, "You have %d seconds left to abort.", 20 - i);2115 sprintf(tmp, _("You have %d seconds left to abort."), 20 - i); 2116 2116 update_progress_form(tmp); 2117 2117 sleep(1); … … 2169 2169 2170 2170 run_program_and_log_output("df -P -m", 3); 2171 mvaddstr_and_log_it(g_currentY, 0, "Unmounting devices ");2172 open_progress_form( "Unmounting devices",2173 "Unmounting all devices that were mounted,",2174 "in preparation for the post-restoration reboot.",2171 mvaddstr_and_log_it(g_currentY, 0, _("Unmounting devices ")); 2172 open_progress_form(_("Unmounting devices"), 2173 _("Unmounting all devices that were mounted,"), 2174 _("in preparation for the post-restoration reboot."), 2175 2175 "", mountlist->entries); 2176 2176 chdir("/"); … … 2205 2205 continue; 2206 2206 } 2207 sprintf(tmp, "Unmounting device %s ", mountlist->el[lino].device);2207 sprintf(tmp, _("Unmounting device %s "), mountlist->el[lino].device); 2208 2208 2209 2209 update_progress_form(tmp); … … 2224 2224 res = run_program_and_log_output(command, 3); 2225 2225 } else { 2226 strcat(tmp, "...not mounted anyway :-) OK");2226 strcat(tmp, _("...not mounted anyway :-) OK")); 2227 2227 res = 0; 2228 2228 } 2229 2229 g_current_progress++; 2230 2230 if (res) { 2231 strcat(tmp, "...Failed");2231 strcat(tmp, _("...Failed")); 2232 2232 retval++; 2233 2233 log_to_screen(tmp); … … 2238 2238 close_progress_form(); 2239 2239 if (retval) { 2240 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");2240 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 2241 2241 } else { 2242 mvaddstr_and_log_it(g_currentY++, 74, "Done.");2242 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 2243 2243 } 2244 2244 if (retval) { 2245 log_to_screen( "Unable to unmount some of your partitions.");2245 log_to_screen(_("Unable to unmount some of your partitions.")); 2246 2246 } else { 2247 log_to_screen( "All partitions were unmounted OK.");2247 log_to_screen(_("All partitions were unmounted OK.")); 2248 2248 } 2249 2249 free(mountlist); … … 2328 2328 malloc_string(tmp); 2329 2329 log_msg(2, "gcffa --- starting"); 2330 log_to_screen( "I'm thinking...");2330 log_to_screen(_("I'm thinking...")); 2331 2331 sprintf(mountpt, "%s/mount.bootdisk", bkpinfo->tmpdir); 2332 2332 device[0] = '\0'; … … 2439 2439 2440 2440 if (!does_file_exist("tmp/mondo-restore.cfg")) { 2441 log_to_screen( "Cannot find config info on tape/CD/floppy");2441 log_to_screen(_("Cannot find config info on tape/CD/floppy")); 2442 2442 return (1); 2443 2443 } … … 2520 2520 log_msg(1, "%s not found", cfg_file); 2521 2521 log_to_screen 2522 ( "Oh dear. Unable to recover configuration file from boot disk");2522 (_("Oh dear. Unable to recover configuration file from boot disk")); 2523 2523 return (1); 2524 2524 } 2525 2525 2526 log_to_screen( "Recovered mondo-restore.cfg");2526 log_to_screen(_("Recovered mondo-restore.cfg")); 2527 2527 if (!does_file_exist(MOUNTLIST_FNAME_STUB)) { 2528 log_to_screen( "...but not mountlist.txt - a pity, really...");2528 log_to_screen(_("...but not mountlist.txt - a pity, really...")); 2529 2529 } 2530 2530 /* start SAH */ … … 2596 2596 while (unfinished_mdstat_devices > 0) { 2597 2597 if (read_mdstat(mdstat, mdstat_file)) { 2598 log_to_screen( "Sorry, cannot read %s", mdstat_file);2598 log_to_screen(_("Sorry, cannot read %s"), mdstat_file); 2599 2599 return; 2600 2600 } … … 2602 2602 if (mdstat->el[i].progress < wait_for_percentage) { 2603 2603 unfinished_mdstat_devices++; 2604 sprintf(screen_message, "Sync'ing /dev/md%d",2604 sprintf(screen_message, _("Sync'ing /dev/md%d"), 2605 2605 mdstat->el[i].md); 2606 2606 open_evalcall_form(screen_message);
Note:
See TracChangeset
for help on using the changeset viewer.