Changeset 392


Ignore:
Timestamp:
Feb 15, 2006, 9:39:26 AM (13 years ago)
Author:
andree
Message:

Made it so that mondoarchive aborts when 'mindi --findkernel' gives a
fatal error and outputs mindi's fatal error message in a newt popup.
This should help making it easier for users to get to the core of the
problem in case mindi fails.
(See also Debian bug #352323.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/mondo/common/libmondo-files.c

    r296 r392  
    341341{
    342342    char tmp[MAX_STR_LEN];
     343    char *command;
    343344
    344345    if (!kernel[0]) {
     
    346347               call_program_and_get_last_line_of_output
    347348               ("mindi --findkernel 2> /dev/null"));
     349    }
     350    // If we didn't get anything back, check whether mindi raised a fatal error
     351    if (!kernel[0]) {
     352        malloc_string(command);
     353        strcpy(command, "grep 'Fatal error' /var/log/mindi.log");
     354        strcpy(tmp, call_program_and_get_last_line_of_output(command));
     355        if (strlen(tmp) > 1) {
     356            popup_and_OK(tmp);
     357            fatal_error("Mindi gave a fatal error. Please check '/var/log/mindi.log'.");
     358        }
     359        paranoid_free(command);
    348360    }
    349361    log_it("Calling Mindi with kernel path of '%s'", kernel);
Note: See TracChangeset for help on using the changeset viewer.