Ignore:
Timestamp:
May 13, 2006, 8:47:23 PM (14 years ago)
Author:
bcornec
Message:

Stable is reverted to r436 (2.0.7) to put it in line with 2.0.8 and start from there over

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/mondo/mondorestore/mondo-rstr-tools.c

    r497 r541  
    241241
    242242        sprintf(question_ptr,
    243                 _("Should I restore the image of %s ?"), incoming_ptr);
     243                "Should I restore the image of %s ?", incoming_ptr);
    244244
    245245        if (ask_me_yes_or_no(question_ptr)) {
     
    355355    while (get_cfg_file_from_archive(bkpinfo)) {
    356356        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?"))
    358358        {
    359359            fatal_error("Could not find config file/archives. Aborting.");
     
    459459
    460460    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");
    462462        already_mounted = TRUE;
    463463    } else {
     
    476476        if (run_program_and_log_output(mount_isodir_command, FALSE)) {
    477477            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.");
    479479            return (1);
    480480        }
    481481        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.");
    483483    }
    484484    if (!IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
     
    491491    if (i < 0) {
    492492        popup_and_OK
    493             (_("Cannot find ISO images in the directory you specified."));
     493            ("Cannot find ISO images in the directory you specified.");
    494494        retval = 1;
    495495    }
     
    617617    these_failed[0] = '\0';
    618618
    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.",
    623623                       "", mountlist->entries);
    624624
     
    628628                    "Again with the /proc - why is this in your mountlist?");
    629629        } else if (is_this_device_mounted(mountlist->el[lino].device)) {
    630             sprintf(tmp, _("%s is already mounted"),
     630            sprintf(tmp, "%s is already mounted",
    631631                    mountlist->el[lino].device);
    632632            log_to_screen(tmp);
     
    657657        if (g_partition_table_locked_up > 0) {
    658658            log_to_screen
    659                 (_("fdisk's ioctl() call to refresh its copy of the partition table causes the kernel to"));
     659                ("fdisk's ictol() call to refresh its copy of the partition table causes the kernel to");
    660660            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");
    662662            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?",
    666666                these_failed);
    667667        if (!ask_me_yes_or_no(tmp)) {
    668668            retval = 0;
    669669            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.");
    672672        } else {
    673             mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
     673            mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
    674674            log_to_screen
    675                 (_("Unable to mount some or all of your partitions."));
     675                ("Unable to mount some or all of your partitions.");
    676676        }
    677677    } 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.");
    680680    }
    681681    run_program_and_log_output("df -P -m", 3);
     
    13401340    if (am_I_in_disaster_recovery_mode()
    13411341        &&
    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?"))
    13431343    {
    13441344//      sprintf(command, "cp -f tmp/mountlist.txt /tmp");
     
    13661366
    13671367    case 0:
    1368         log_to_screen(("Pre-processing filelist"));
     1368        log_to_screen("Pre-processing filelist");
    13691369        if (!does_file_exist(g_biggielist_txt)) {
    13701370            sprintf(command, "> %s", g_biggielist_txt);
     
    13781378
    13791379    default:
    1380         open_evalcall_form(_("Pre-processing filelist"));
     1380        open_evalcall_form("Pre-processing filelist");
    13811381        while (!waitpid(pid, (int *) 0, WNOHANG)) {
    13821382            usleep(100000);
     
    13911391    unlink(g_filelist_full);
    13921392    if (g_text_mode) {
    1393         printf(_("Restore which directory? --> "));
     1393        printf("Restore which directory? --> ");
    13941394        fgets(tmp, sizeof(tmp), stdin);
    13951395        toggle_path_selection(filelist, tmp, TRUE);
     
    15241524    else {
    15251525        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.");
    15271527        res = run_lilo(offer_to_hack_scripts);
    15281528    }
     
    15301530    retval += res;
    15311531    if (res) {
    1532         log_to_screen(_("Your boot loader returned an error"));
     1532        log_to_screen("Your boot loader returned an error");
    15331533    } else {
    1534         log_to_screen(_("Your boot loader ran OK"));
     1534        log_to_screen("Your boot loader ran OK");
    15351535    }
    15361536    paranoid_free(device);
     
    16131613    }
    16141614    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?"))
    16161616        /* interactive mode */
    16171617    {
    16181618        mvaddstr_and_log_it(g_currentY,
    16191619                            0,
    1620                             _("Modifying fstab and grub.conf, and running GRUB...                             "));
     1620                            "Modifying fstab and grub.conf, and running GRUB...                             ");
    16211621        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",
    16241624                                 boot_device, MAX_STR_LEN / 4);
    16251625            sprintf(command, "stabgrub-me %s", boot_device);
     
    16271627            if (res) {
    16281628                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.");
    16301630                newtSuspend();
    16311631                system("chroot " MNT_RESTORING);
    16321632                newtResume();
    1633                 popup_and_OK(_("Thank you."));
     1633                popup_and_OK("Thank you.");
    16341634            } else {
    16351635                done = TRUE;
    16361636            }
    1637             popup_and_OK(_("You will now edit fstab and grub.conf"));
     1637            popup_and_OK("You will now edit fstab and grub.conf");
    16381638            if (!g_text_mode) {
    16391639                newtSuspend();
     
    16521652        mvaddstr_and_log_it(g_currentY,
    16531653                            0,
    1654                             _("Running GRUB...                                                 "));
     1654                            "Running GRUB...                                                 ");
    16551655        iamhere(command);
    16561656        res = run_program_and_log_output(command, 1);
    16571657        if (res) {
    16581658            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.");
    16601660            newtSuspend();
    16611661            system("chroot " MNT_RESTORING);
    16621662            newtResume();
    1663             popup_and_OK(_("Thank you."));
     1663            popup_and_OK("Thank you.");
    16641664        }
    16651665    }
    16661666    if (res) {
    1667         mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
     1667        mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
    16681668        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.");
    16701670        log_msg(1, "Type:-");
    16711671        log_msg(1, "    mount-me");
     
    16781678                "If you're really stuck, please e-mail the mailing list.");
    16791679    } else {
    1680         mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
     1680        mvaddstr_and_log_it(g_currentY++, 74, "Done.");
    16811681    }
    16821682    paranoid_free(rootdev);
     
    17161716    strcpy(editor, find_my_editor());
    17171717    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?"))
    17191719
    17201720        /* interactive mode */
     
    17221722        mvaddstr_and_log_it(g_currentY,
    17231723                            0,
    1724                             _("Modifying fstab and elilo.conf...                             "));
     1724                            "Modifying fstab and elilo.conf...                             ");
    17251725        sprintf(command, "stabelilo-me");
    17261726        res = run_program_and_log_output(command, 3);
    17271727        if (res) {
    17281728            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.");
    17301730            for (done = FALSE; !done;) {
    17311731                if (!g_text_mode) {
     
    17411741                }
    17421742//              newtCls();
    1743                 if (ask_me_yes_or_no(_("Edit them again?"))) {
     1743                if (ask_me_yes_or_no("Edit them again?")) {
    17441744                    continue;
    17451745                }
     
    17471747            }
    17481748        } else {
    1749             log_to_screen(_("elilo.conf and fstab were modified OK"));
     1749            log_to_screen("elilo.conf and fstab were modified OK");
    17501750        }
    17511751    } else
     
    17911791    strcpy(editor, find_my_editor());
    17921792    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?"))
    17941794
    17951795        /* interactive mode */
     
    17971797        mvaddstr_and_log_it(g_currentY,
    17981798                            0,
    1799                             _("Modifying fstab and lilo.conf, and running LILO...                             "));
     1799                            "Modifying fstab and lilo.conf, and running LILO...                             ");
    18001800        sprintf(command, "stablilo-me");
    18011801        res = run_program_and_log_output(command, 3);
    18021802        if (res) {
    18031803            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.");
    18051805            for (done = FALSE; !done;) {
    18061806                if (!g_text_mode) {
     
    18151815                }
    18161816//              newtCls();
    1817                 if (ask_me_yes_or_no(_("Edit them again?"))) {
     1817                if (ask_me_yes_or_no("Edit them again?")) {
    18181818                    continue;
    18191819                }
     
    18291829                    done =
    18301830                        ask_me_yes_or_no
    1831                         (_("LILO failed. Re-edit system files?"));
     1831                        ("LILO failed. Re-edit system files?");
    18321832                } else {
    18331833                    done = TRUE;
     
    18351835            }
    18361836        } else {
    1837             log_to_screen(_("lilo.conf and fstab were modified OK"));
     1837            log_to_screen("lilo.conf and fstab were modified OK");
    18381838        }
    18391839    } else
     
    18421842        mvaddstr_and_log_it(g_currentY,
    18431843                            0,
    1844                             _("Running LILO...                                                 "));
     1844                            "Running LILO...                                                 ");
    18451845        res =
    18461846            run_program_and_log_output("chroot " MNT_RESTORING " lilo -L",
     
    18521852        }
    18531853        if (res) {
    1854             mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
     1854            mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
    18551855            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.");
    18571857        } else {
    1858             mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
     1858            mvaddstr_and_log_it(g_currentY++, 74, "Done.");
    18591859        }
    18601860    }
     
    19041904
    19051905    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?"))
    19071907        /* interactive mode */
    19081908    {
    19091909        mvaddstr_and_log_it(g_currentY, 0,
    1910                             _("Modifying fstab and restoring MBR...                           "));
     1910                            "Modifying fstab and restoring MBR...                           ");
    19111911        for (done = FALSE; !done;) {
    19121912            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");
    19141914                if (!g_text_mode) {
    19151915                    newtSuspend();
     
    19221922//              newtCls();
    19231923            }
    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",
    19261926                                 boot_device, MAX_STR_LEN / 4);
    19271927            sprintf(command, "stabraw-me %s", boot_device);
    19281928            res = run_program_and_log_output(command, 3);
    19291929            if (res) {
    1930                 done = ask_me_yes_or_no(_("Modifications failed. Re-try?"));
     1930                done = ask_me_yes_or_no("Modifications failed. Re-try?");
    19311931            } else {
    19321932                done = TRUE;
     
    19371937    {
    19381938        mvaddstr_and_log_it(g_currentY, 0,
    1939                             _("Restoring MBR...                                               "));
     1939                            "Restoring MBR...                                               ");
    19401940        res = run_program_and_log_output(command, 3);
    19411941    }
    19421942    if (res) {
    1943         mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
     1943        mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
    19441944        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.");
    19461946    } else {
    1947         mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
     1947        mvaddstr_and_log_it(g_currentY++, 74, "Done.");
    19481948    }
    19491949    paranoid_free(command);
     
    20852085{
    20862086    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");
    20882088    paranoid_MR_finish(254);
    20892089}
     
    21072107        return;
    21082108    }
    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.",
    21122112                       "", 20);
    21132113    for (i = 0; i < 20; i++) {
    21142114        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);
    21162116        update_progress_form(tmp);
    21172117        sleep(1);
     
    21692169
    21702170    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.",
    21752175                       "", mountlist->entries);
    21762176    chdir("/");
     
    22052205            continue;
    22062206        }
    2207         sprintf(tmp, _("Unmounting device %s  "), mountlist->el[lino].device);
     2207        sprintf(tmp, "Unmounting device %s  ", mountlist->el[lino].device);
    22082208
    22092209        update_progress_form(tmp);
     
    22242224            res = run_program_and_log_output(command, 3);
    22252225        } else {
    2226             strcat(tmp, _("...not mounted anyway :-) OK"));
     2226            strcat(tmp, "...not mounted anyway :-) OK");
    22272227            res = 0;
    22282228        }
    22292229        g_current_progress++;
    22302230        if (res) {
    2231             strcat(tmp, _("...Failed"));
     2231            strcat(tmp, "...Failed");
    22322232            retval++;
    22332233            log_to_screen(tmp);
     
    22382238    close_progress_form();
    22392239    if (retval) {
    2240         mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
     2240        mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
    22412241    } else {
    2242         mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
     2242        mvaddstr_and_log_it(g_currentY++, 74, "Done.");
    22432243    }
    22442244    if (retval) {
    2245         log_to_screen(_("Unable to unmount some of your partitions."));
     2245        log_to_screen("Unable to unmount some of your partitions.");
    22462246    } else {
    2247         log_to_screen(_("All partitions were unmounted OK."));
     2247        log_to_screen("All partitions were unmounted OK.");
    22482248    }
    22492249    free(mountlist);
     
    23282328    malloc_string(tmp);
    23292329    log_msg(2, "gcffa --- starting");
    2330     log_to_screen(_("I'm thinking..."));
     2330    log_to_screen("I'm thinking...");
    23312331    sprintf(mountpt, "%s/mount.bootdisk", bkpinfo->tmpdir);
    23322332    device[0] = '\0';
     
    24392439
    24402440            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");
    24422442                return (1);
    24432443            }
     
    25202520        log_msg(1, "%s not found", cfg_file);
    25212521        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");
    25232523        return (1);
    25242524    }
    25252525
    2526     log_to_screen(_("Recovered mondo-restore.cfg"));
     2526    log_to_screen("Recovered mondo-restore.cfg");
    25272527    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...");
    25292529    }
    25302530/* start SAH */
     
    25962596    while (unfinished_mdstat_devices > 0) {
    25972597        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);
    25992599            return;
    26002600        }
     
    26022602            if (mdstat->el[i].progress < wait_for_percentage) {
    26032603                unfinished_mdstat_devices++;
    2604                 sprintf(screen_message, _("Sync'ing /dev/md%d"),
     2604                sprintf(screen_message, "Sync'ing /dev/md%d",
    26052605                        mdstat->el[i].md);
    26062606                open_evalcall_form(screen_message);
Note: See TracChangeset for help on using the changeset viewer.