Ignore:
Timestamp:
Apr 16, 2007, 4:13:59 PM (12 years ago)
Author:
bruno
Message:

Log files are now consistent: mondoarchive.log for mondoarchive (containing also mindi.log) and mondorestore.log for mondorestore (copied from /tmp (ram) to /var/log (disk) at the end of the restore)
One include has been created for each bianry containing only that declaration ofr the moment, but which will be extended to include all local definitions (ps_* e.g.)
Doc updated accordingly
LOGFILE in restore process is now passed in the environment and not duplicated anymore
LogIt? is not redifined either
LOGFILE should be put in environment by mondoarchive for mindi's usage but that's a step left for later.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.2/mondo/src/mondorestore/mondo-prep.c

    r1303 r1315  
    337337    /**  buffers **********************************************/
    338338    char *tmp;
     339    char *tmp1 = NULL;
    339340    char *incoming;
    340341    char *command;
     
    486487            log_it("%s... so I'll get creative.", tmp);
    487488            if (lvmversion == 2) {
    488                 strcpy(tmp, call_program_and_get_last_line_of_output
    489                        ("tail -n5 /var/log/mondo-archive.log | grep Insufficient | tail -n1"));
     489                asprintf(&tmp1, "tail -n5 %s | grep Insufficient | tail -n1", MONDO_LOGFILE);
     490                strcpy(tmp, call_program_and_get_last_line_of_output(tmp1));
     491                free(tmp1);
    490492            } else {
    491                 strcpy(tmp, call_program_and_get_last_line_of_output
    492                        ("tail -n5 /var/log/mondo-archive.log | grep lvcreate | tail -n1"));
     493                asprintf(&tmp1, "tail -n5 %s | grep lvcreate | tail -n1", MONDO_LOGFILE);
     494                strcpy(tmp, call_program_and_get_last_line_of_output(tmp1));
     495                free(tmp1);
    493496            }
    494497            for (p = tmp; *p != '\0' && !isdigit(*p); p++);
Note: See TracChangeset for help on using the changeset viewer.