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/mondoarchive/main.c

    r538 r541  
    247247{
    248248    struct s_bkpinfo *bkpinfo;
    249     struct s_mrconf *mrconf;
    250249    char *tmp;
    251250    int res, retval;
    252251    char *say_at_end;
    253252
    254 #ifdef ENABLE_NLS
    255     setlocale(LC_ALL, "");
    256     (void) textdomain("mondo");
    257 #endif
    258253/* Make sure I'm root; abort if not */
    259254    if (getuid() != 0) {
    260         fprintf(stderr, _("Please run as root.\n"));
     255        fprintf(stderr, "Please run as root.\r\n");
    261256        exit(127);
    262257    }
     
    266261        && (!strcmp(argv[argc - 1], "-v") || !strcmp(argv[argc - 1], "-V")
    267262            || !strcmp(argv[argc - 1], "--version"))) {
    268         printf(_("mondoarchive v%s\nSee man page for help\n"), PACKAGE_VERSION);
     263        printf("mondoarchive v%s\nSee man page for help\n", PACKAGE_VERSION);
    269264        exit(0);
    270265    }
     
    275270    malloc_string(tmp);
    276271    malloc_string(say_at_end);
    277 
    278     /* Initialize Configuration Structure */
    279     mrarchive_init_conf(mrconf);
    280272
    281273    res = 0;
     
    283275    diffs = 0;
    284276    say_at_end[0] = '\0';
    285     printf(_("Initializing...\n"));
     277    printf("Initializing...\n");
    286278    if (!(bkpinfo = malloc(sizeof(struct s_bkpinfo)))) {
    287279        fatal_error("Cannot malloc bkpinfo");
     
    329321        setup_newt_stuff();
    330322        if (!strstr(argv[2], "filelist")) {
    331             printf(_("Sorry - filelist goes first\n"));
     323            printf("Sorry - filelist goes first\n");
    332324            finish(1);
    333325        } else {
     
    358350        setup_newt_stuff();
    359351        if (!strstr(argv[2], "filelist")) {
    360             printf(_("Sorry - filelist goes first\n"));
     352            printf("Sorry - filelist goes first\n");
    361353            finish(1);
    362354        } else {
     
    378370        setup_newt_stuff();
    379371        if (find_cdrw_device(tmp)) {
    380             printf(_("Failed to find CDR-RW drive\n"));
    381         } else {
    382             printf(_("CD-RW is at %s\n"), tmp);
     372            printf("Failed to find CDR-RW drive\n");
     373        } else {
     374            printf("CD-RW is at %s\n", tmp);
    383375        }
    384376        tmp[0] = '\0';
    385377        if (find_cdrom_device(tmp, atoi(argv[2]))) {
    386             printf(_("Failed to find CD-ROM drive\n"));
    387         } else {
    388             printf(_("CD-ROM is at %s\n"), tmp);
     378            printf("Failed to find CD-ROM drive\n");
     379        } else {
     380            printf("CD-ROM is at %s\n", tmp);
    389381        }
    390382        finish(0);
     
    396388        setup_newt_stuff();
    397389        if (find_dvd_device(tmp, atoi(argv[2]))) {
    398             printf(_("Failed to find DVD drive\n"));
    399         } else {
    400             printf(_("DVD is at %s\n"), tmp);
     390            printf("Failed to find DVD drive\n");
     391        } else {
     392            printf("DVD is at %s\n", tmp);
    401393        }
    402394        finish(0);
     
    409401    if (argc > 2 && !strcmp(argv[1], "test-dev")) {
    410402        if (is_dev_an_NTFS_dev(argv[2])) {
    411             printf(_("%s is indeed an NTFS dev\n"), argv[2]);
    412         } else {
    413             printf(_("%s is _not_ an NTFS dev\n"), argv[2]);
     403            printf("%s is indeed an NTFS dev\n", argv[2]);
     404        } else {
     405            printf("%s is _not_ an NTFS dev\n", argv[2]);
    414406        }
    415407        finish(0);
     
    434426        if (res) {
    435427            printf
    436                 (_("Errors were detected in the command line you supplied.\n"));
    437             printf(_("Please review the log file - %s \n"),MONDO_LOGFILE);
     428                ("Errors were detected in the command line you supplied.\n");
     429            printf("Please review the log file - " MONDO_LOGFILE "\n");
    438430            log_msg(1, "Mondoarchive will now exit.");
    439431            finish(1);
     
    449441
    450442    log_to_screen
    451         (_("BusyBox's sources are available from http://www.busybox.net"));
     443        ("BusyBox's sources are available from http://www.busybox.net");
    452444    sprintf(g_erase_tmpdir_and_scratchdir, "rm -Rf %s %s", bkpinfo->tmpdir,
    453445            bkpinfo->scratchdir);
     
    461453      finish(0);
    462454*/
    463         res = backup_data(bkpinfo, mrconf);
     455        res = backup_data(bkpinfo);
    464456        retval += res;
    465457        if (res) {
    466458            strcat(say_at_end,
    467                    _("Data archived. Please check the logs, just as a precaution. "));
    468         } else {
    469             strcat(say_at_end, _("Data archived OK. "));
     459                   "Data archived. Please check the logs, just as a precaution. ");
     460        } else {
     461            strcat(say_at_end, "Data archived OK. ");
    470462        }
    471463    }
     
    475467        res = verify_data(bkpinfo);
    476468        if (res < 0) {
    477             sprintf(tmp, _("%d difference%c found."), -res,
     469            sprintf(tmp, "%d difference%c found.", -res,
    478470                    (-res != 1) ? 's' : ' ');
    479471            strcat(say_at_end, tmp);
     
    495487    if (!retval) {
    496488        mvaddstr_and_log_it(g_currentY++, 0,
    497                             _("Backup and/or verify ran to completion. Everything appears to be fine."));
     489                            "Backup and/or verify ran to completion. Everything appears to be fine.");
    498490    } else {
    499491        mvaddstr_and_log_it(g_currentY++, 0,
    500                             _("Backup and/or verify ran to completion. However, errors did occur."));
    501     }
    502 
    503     if (does_file_exist("/var/cache/mindi/mondorescue.iso")) {
     492                            "Backup and/or verify ran to completion. However, errors did occur.");
     493    }
     494
     495    if (does_file_exist("/root/images/mindi/mondorescue.iso")) {
    504496        log_to_screen
    505             (_("/var/cache/mindi/mondorescue.iso, a boot/utility CD, is available if you want it."));
     497            ("/root/images/mindi/mondorescue.iso, a boot/utility CD, is available if you want it.");
    506498    }
    507499
     
    510502        if (g_text_mode) {
    511503            log_to_screen
    512                 (_("Type 'less /tmp/changed.files' to see which files don't match the archives"));
     504                ("Type 'less /tmp/changed.files' to see which files don't match the archives");
    513505        } else {
    514506            log_msg(1,
    515                     _("Type 'less /tmp/changed.files' to see which files don't match the archives"));
     507                    "Type 'less /tmp/changed.files' to see which files don't match the archives");
    516508            log_msg(2, "Calling popup_changelist_from_file()");
    517509            popup_changelist_from_file("/tmp/changed.files");
     
    531523    system("rm -Rf /tmp.mondo.* /mondo.scratch.*");
    532524    if (!retval) {
    533         printf(_("Mondoarchive ran OK.\n"));
     525        printf("Mondoarchive ran OK.\n");
    534526    } else {
    535         printf(_("Errors occurred during backup. Please check logfile.\n"));
     527        printf("Errors occurred during backup. Please check logfile.\n");
    536528    }
    537529    distro_specific_kludges_at_end_of_mondoarchive();
     
    557549    if (!g_text_mode) {
    558550        popup_and_OK
    559             (_("Mondo Archive has finished its run. Please press ENTER to return to the shell prompt."));
    560         log_to_screen(_("See %s for details of backup run."), MONDO_LOGFILE);
     551            ("Mondo Archive has finished its run. Please press ENTER to return to the shell prompt.");
     552        log_to_screen("See %s for details of backup run.", MONDO_LOGFILE);
    561553        finish(retval);
    562554    } else {
    563         printf(_("See %s for details of backup run.\n"), MONDO_LOGFILE);
     555        printf("See %s for details of backup run.\n", MONDO_LOGFILE);
    564556        exit(retval);
    565557    }
Note: See TracChangeset for help on using the changeset viewer.