Ignore:
Timestamp:
Jun 19, 2013, 8:34:46 AM (7 years ago)
Author:
Bruno Cornec
Message:
  • First pass on svn merge -r 2935:3146 ../3.0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/mondo/src/mondoarchive/mondoarchive.c

    r2508 r3147  
    4747 */
    4848bool g_ISO_restore_mode = FALSE;
     49
     50/* Whether we should fail immediately at first error */
     51bool g_fail_immediately = FALSE;
    4952
    5053/* Do we use extended attributes and acl ?
     
    159162    int retval = 0;
    160163    char *say_at_end = NULL;
     164    FILE *fin = NULL;
    161165
    162166    printf("Initializing...\n");
     
    260264        g_loglevel = 10;
    261265        finish(set_acl_list(argv[2], argv[3]));
     266    }
     267    if (argc >= 2 && !strcmp(argv[1], "mkraidtab")) {
     268        g_loglevel = 10;
     269        g_text_mode = TRUE;
     270        setup_newt_stuff();
     271#undef MDSTAT_FILE
     272#define MDSTAT_FILE "/tmp/mdstat"
     273        if (!(fin = fopen(MDSTAT_FILE, "r"))) {
     274            log_msg(1, "Could not open %s.\n", MDSTAT_FILE);
     275                finish(1);
     276        }
     277
     278        create_raidtab_from_mdstat(MDSTAT_FILE,"/tmp/raidtab");
     279        finish(0);
    262280    }
    263281
     
    397415    run_program_and_log_output("mount", 2);
    398416
    399     system("rm -f "MONDO_CACHE"/last-backup.aborted");
     417    paranoid_system("rm -f "MONDO_CACHE"/last-backup.aborted");
    400418    if (!retval) {
    401419        printf("Mondoarchive ran OK.\n");
     
    421439    mr_free(tmp);
    422440
    423     chdir("/tmp");
     441    if (chdir("/tmp")) {
     442        // FIXME
     443    }
    424444
    425445    if (!g_text_mode) {
Note: See TracChangeset for help on using the changeset viewer.