Changeset 1203


Ignore:
Timestamp:
Feb 25, 2007, 11:12:55 AM (13 years ago)
Author:
bruno
Message:

Still searching

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/mondorestore/mondorestore.c

    r1202 r1203  
    1313 **************************************************************************/
    1414#include <unistd.h>
     15#include <utime.h>
    1516
    1617#include "my-stuff.h"
     
    234235    popup_and_OK(COMPAQ_PROLIANTS_SUCK);
    235236    if (ask_me_yes_or_no
    236         (_
    237          ("Would you like to reboot and use your Compaq CD to prep your hard drive?")))
     237        (_("Would you like to reboot and use your Compaq CD to prep your hard drive?")))
    238238    {
    239         fatal_error(_
    240                     ("Aborting. Please reboot and prep your hard drive with your Compaq CD."));
     239        fatal_error(_("Aborting. Please reboot and prep your hard drive with your Compaq CD."));
    241240    }
    242241}
     
    273272        interactively_obtain_media_parameters_from_user(bkpinfo, FALSE);
    274273    } else {
    275         popup_and_OK(_
    276                      ("No restoring or comparing will take place today."));
     274        popup_and_OK(_("No restoring or comparing will take place today."));
    277275        if (is_this_device_mounted("/mnt/cdrom")) {
    278276            run_program_and_log_output("umount /mnt/cdrom", FALSE);
     
    365363    if (g_text_mode) {
    366364        if (!ask_me_yes_or_no
    367             (_
    368              ("Interactive Mode + textonly = experimental! Proceed anyway?")))
     365            (_("Interactive Mode + textonly = experimental! Proceed anyway?")))
    369366        {
    370367            fatal_error("Wise move.");
     
    410407        mvaddstr_and_log_it(1, 30, _("Restoring Interactively"));
    411408        if (bkpinfo->differential) {
    412             log_to_screen(_
    413                           ("Because this is a differential backup, disk"));
    414             log_to_screen(_
    415                           (" partitioning and formatting will not take place."));
     409            log_to_screen(_("Because this is a differential backup, disk"));
     410            log_to_screen(_(" partitioning and formatting will not take place."));
    416411            done = TRUE;
    417412        } else {
    418413            if (ask_me_yes_or_no
    419                 (_
    420                  ("Do you want to erase and partition your hard drives?")))
     414                (_("Do you want to erase and partition your hard drives?")))
    421415            {
    422416                if (partition_table_contains_Compaq_diagnostic_partition
     
    430424                    if (ptn_errs) {
    431425                        log_to_screen
    432                             (_
    433                              ("Warning. Errors occurred during disk partitioning."));
     426                            (_("Warning. Errors occurred during disk partitioning."));
    434427                    }
    435428
     
    437430                    if (!fmt_errs) {
    438431                        log_to_screen
    439                             (_
    440                              ("Errors during disk partitioning were handled OK."));
    441                         log_to_screen(_
    442                                       ("Partitions were formatted OK despite those errors."));
     432                            (_("Errors during disk partitioning were handled OK."));
     433                        log_to_screen(_("Partitions were formatted OK despite those errors."));
    443434                        ptn_errs = 0;
    444435                    }
     
    450441            } else {
    451442                mvaddstr_and_log_it(g_currentY++, 0,
    452                                     _
    453                                     ("User opted not to partition the devices"));
     443                                    _("User opted not to partition the devices"));
    454444                if (ask_me_yes_or_no
    455445                    (_("Do you want to format your hard drives?"))) {
     
    467457                mvaddstr_and_log_it(g_currentY++,
    468458                                    0,
    469                                     _
    470                                     ("Errors occurred. Please repartition and format drives manually."));
     459                                    _("Errors occurred. Please repartition and format drives manually."));
    471460                done = FALSE;
    472461            }
     
    474463                mvaddstr_and_log_it(g_currentY++,
    475464                                    0,
    476                                     _
    477                                     ("Errors occurred during partitioning. Formatting, however, went OK."));
     465                                    _("Errors occurred during partitioning. Formatting, however, went OK."));
    478466                done = TRUE;
    479467            }
     
    497485    /* restore */
    498486    if ((restore_all =
    499          ask_me_yes_or_no(_
    500                           ("Do you want me to restore all of your data?"))))
     487         ask_me_yes_or_no(_("Do you want me to restore all of your data?"))))
    501488    {
    502489        mr_msg(1, "Restoring all data");
     
    547534        mvaddstr_and_log_it(g_currentY++,
    548535                            0,
    549                             _
    550                             ("User opted not to restore any data.                                  "));
     536                            _("User opted not to restore any data.                                  "));
    551537    }
    552538    if (retval) {
    553539        mvaddstr_and_log_it(g_currentY++,
    554540                            0,
    555                             _
    556                             ("Errors occurred during the restore phase.            "));
     541                            _("Errors occurred during the restore phase.            "));
    557542    }
    558543
     
    562547        mvaddstr_and_log_it(g_currentY++,
    563548                            0,
    564                             _
    565                             ("User opted not to initialize the boot loader."));
     549                            _("User opted not to initialize the boot loader."));
    566550    }
    567551
     
    572556        (_("Label your ext2 and ext3 partitions if necessary?"))) {
    573557        mvaddstr_and_log_it(g_currentY, 0,
    574                             _
    575                             ("Using e2label to label your ext2,3 partitions"));
     558                            _("Using e2label to label your ext2,3 partitions"));
    576559        if (does_file_exist("/tmp/fstab.new")) {
    577560            mr_asprintf(&fstab_fname, "/tmp/fstab.new");
     
    601584        mvaddstr_and_log_it(g_currentY++,
    602585                            0,
    603                             _
    604                             ("Warning - errors occurred during the restore phase."));
     586                            _("Warning - errors occurred during the restore phase."));
    605587    }
    606588    iamhere("Leaving interactive_mode()");
     
    657639    if (system("umount /tmp/isodir 2> /dev/null")) {
    658640        log_to_screen
    659             (_
    660              ("WARNING - unable to unmount device where the ISO files are stored."));
     641            (_("WARNING - unable to unmount device where the ISO files are stored."));
    661642    }
    662643    return (retval);
     
    684665            /* -H option */
    685666            mr_asprintf(&tmp,
    686                 _
    687                 (" Mondo has restored your system. Please remove the backup media and reboot.\n\nPlease visit our website at http://www.
     667                _(" Mondo has restored your system. Please remove the backup media and reboot.\n\nPlease visit our website at http://www.
    688668mondorescue.org for more information."));
    689669            popup_and_OK(tmp);
     
    691671        }
    692672
    693         log_to_screen(_
    694             ("Mondo has restored your system. Please remove the backup media and reboot."));
    695         log_to_screen(_
    696             ("Thank you for using Mondo Rescue."));
    697         log_to_screen(_
    698             ("Please visit our website at http://www.mondorescue.org for more information."));
     673        log_to_screen(_("Mondo has restored your system. Please remove the backup media and reboot."));
     674        log_to_screen(_("Thank you for using Mondo Rescue."));
     675        log_to_screen(_("Please visit our website at http://www.mondorescue.org for more information."));
    699676    }
    700677    g_I_have_just_nuked = TRUE;
     
    744721    if (!evaluate_mountlist(mountlist, tmpA, tmpB, tmpC)) {
    745722        mr_asprintf(&tmp,
    746                 _
    747                 ("Mountlist analyzed. Result: \"%s %s %s\" Switch to Interactive Mode?"),
     723                _("Mountlist analyzed. Result: \"%s %s %s\" Switch to Interactive Mode?"),
    748724                tmpA, tmpB, tmpC);
    749725        if (ask_me_yes_or_no(tmp)) {
     
    761737    if (bkpinfo->differential) {
    762738        log_to_screen(_("Because this is a differential backup, disk"));
    763         log_to_screen(_
    764                       ("partitioning and formatting will not take place."));
     739        log_to_screen(_("partitioning and formatting will not take place."));
    765740        res = 0;
    766741    } else {
     
    784759                if (res) {
    785760                    log_to_screen
    786                         (_
    787                          ("Warning. Errors occurred during partitioning."));
     761                        (_("Warning. Errors occurred during partitioning."));
    788762                    res = 0;
    789763                }
     
    794768                sleep(1);
    795769                sync();
    796                 log_to_screen(_
    797                               ("Please wait. This may take a few minutes."));
     770                log_to_screen(_("Please wait. This may take a few minutes."));
    798771                res += format_everything(mountlist, FALSE, raidlist);
    799772            }
     
    805778        mvaddstr_and_log_it(g_currentY++,
    806779                            0,
    807                             _
    808                             ("Failed to partition and/or format your hard drives."));
     780                            _("Failed to partition and/or format your hard drives."));
    809781
    810782        if (ask_me_yes_or_no(_("Try in interactive mode instead?"))) {
     
    822794        unmount_all_devices(mountlist);
    823795        log_to_screen
    824             (_
    825              ("Unable to mount all partitions. Sorry, I cannot proceed."));
     796            (_("Unable to mount all partitions. Sorry, I cannot proceed."));
    826797        return (retval);
    827798    }
     
    837808    mvaddstr_and_log_it(g_currentY,
    838809                        0,
    839                         _
    840                         ("Using e2label to label your ext2,3 partitions"));
     810                        _("Using e2label to label your ext2,3 partitions"));
    841811
    842812    mr_asprintf(&tmp, "label-partitions-as-necessary %s < /tmp/fstab",
     
    846816
    847817    if (res) {
    848         log_to_screen(_
    849                       ("label-partitions-as-necessary returned an error"));
     818        log_to_screen(_("label-partitions-as-necessary returned an error"));
    850819        mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
    851820    } else {
     
    888857    if (!g_restoring_live_from_cd) {
    889858        popup_and_OK
    890             (_
    891              ("Please insert tape/CD/boot floppy, then hit 'OK' to continue."));
     859            (_("Please insert tape/CD/boot floppy, then hit 'OK' to continue."));
    892860        sleep(1);
    893861    }
     
    945913
    946914
    947 #include <utime.h>
    948915/**
    949916 * @addtogroup LLrestoreGroup
     
    16001567            if (run_program_and_log_output(tmp, FALSE)) {
    16011568                log_to_screen
    1602                     (_
    1603                      ("(compare_a_tarball) Compression program not found - oh no!"));
     1569                    (_("(compare_a_tarball) Compression program not found - oh no!"));
    16041570                mr_free(tmp);
    16051571                mr_free(executable);
     
    17061672    if (does_file_exist("/PAUSE")) {
    17071673        popup_and_OK
    1708             (_
    1709              ("Press ENTER to go on. Delete /PAUSE to stop these pauses."));
     1674            (_("Press ENTER to go on. Delete /PAUSE to stop these pauses."));
    17101675    }
    17111676    unlink(filelist_subset_fname);
     
    20301995    if (does_file_exist("/PAUSE")) {
    20311996        popup_and_OK
    2032             (_
    2033              ("Press ENTER to go on. Delete /PAUSE to stop these pauses."));
     1997            (_("Press ENTER to go on. Delete /PAUSE to stop these pauses."));
    20341998    }
    20351999    close_progress_form();
     
    21352099            if (current_tarball_number == 0) {
    21362100                log_to_screen
    2137                     (_
    2138                      ("No tarballs. Strange. Maybe you only backed up freakin' big files?"));
     2101                    (_("No tarballs. Strange. Maybe you only backed up freakin' big files?"));
    21392102                mr_free(progress_str);
    21402103                return (0);
     
    23612324    if (does_file_exist("/PAUSE")) {
    23622325        popup_and_OK
    2363             (_
    2364              ("Press ENTER to go on. Delete /PAUSE to stop these pauses."));
     2326            (_("Press ENTER to go on. Delete /PAUSE to stop these pauses."));
    23652327    }
    23662328
     
    25612523    if (!find_home_of_exe("petris") && !g_text_mode) {
    25622524        newtDrawRootText(0, g_noof_rows - 2,
    2563                          _
    2564                          ("Press ALT-<left cursor> twice to play Petris :-) "));
     2525                         _("Press ALT-<left cursor> twice to play Petris :-) "));
    25652526        newtRefresh();
    25662527    }
     
    25692530        mount_cdrom(bkpinfo);
    25702531        mvaddstr_and_log_it(g_currentY++, 0,
    2571                             _
    2572                             ("Restoring OS and data from streaming media"));
     2532                            _("Restoring OS and data from streaming media"));
    25732533        if (bkpinfo->backup_media_type == cdstream) {
    25742534            openin_cdstream(bkpinfo);
     
    30262986        if (argc != 1) {
    30272987            popup_and_OK
    3028                 (_
    3029                  ("Live mode doesn't support command-line parameters yet."));
     2988                (_("Live mode doesn't support command-line parameters yet."));
    30302989            paranoid_MR_finish(1);
    30312990        }
     
    30893048        if (retval) {
    30903049            log_to_screen
    3091                 (_
    3092                  ("Warning - load_raidtab_into_raidlist returned an error"));
     3050                (_("Warning - load_raidtab_into_raidlist returned an error"));
    30933051        }
    30943052
     
    31623120        if (does_file_exist("/tmp/changed.files")) {
    31633121            log_to_screen
    3164                 (_
    3165                  ("See /tmp/changed.files for list of files that have changed."));
     3122                (_("See /tmp/changed.files for list of files that have changed."));
    31663123        }
    31673124        mvaddstr_and_log_it(g_currentY++,
    31683125                            0,
    3169                             _
    3170                             ("Run complete. Errors were reported. Please review the logfile."));
     3126                            _("Run complete. Errors were reported. Please review the logfile."));
    31713127    } else {
    31723128        if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    31733129            mvaddstr_and_log_it(g_currentY++,
    31743130                                0,
    3175                                 _
    3176                                 ("Run complete. Please remove floppy/CD/media and reboot."));
     3131                                _("Run complete. Please remove floppy/CD/media and reboot."));
    31773132        } else {
    31783133            run_program_and_log_output("sync", FALSE);
     
    31893144            mvaddstr_and_log_it(g_currentY++,
    31903145                                0,
    3191                                 _
    3192                                 ("Run complete. Please remove media and reboot."));
     3146                                _("Run complete. Please remove media and reboot."));
    31933147        }
    31943148    }
     
    32373191
    32383192    log_to_screen
    3239         (_
    3240          ("Restore log copied to /tmp/mondo-restore.log on your hard disk"));
     3193        (_("Restore log copied to /tmp/mondo-restore.log on your hard disk"));
    32413194    log_to_screen(_("Mondo-restore is exiting (retval=%d)"), retval);
    32423195
Note: See TracChangeset for help on using the changeset viewer.