Ignore:
Timestamp:
Jan 27, 2011, 7:31:24 PM (13 years ago)
Author:
Bruno Cornec
Message:

r4180@localhost: bruno | 2011-01-27 10:26:41 +0100

  • Fix multiple port issues from 2.2.9 that prevented mindi to work
  • Change interface of call_program_and_get_last_line_of_output to allow not logging (call to mindi)
  • Status is working boot, but NFS interface broken due to conf file issues
File:
1 edited

Legend:

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

    r2623 r2704  
    274274    char *kernel = NULL;;
    275275
    276     kernel = call_program_and_get_last_line_of_output("mindi --findkernel 2> /dev/null");
     276    kernel = call_program_and_get_last_line_of_output("mindi --findkernel 2> /dev/null",TRUE);
    277277   
    278278    // If we didn't get anything back, check whether mindi raised a fatal error
    279279    if (!kernel[0]) {
    280280        mr_asprintf(command, "%s", "grep 'Fatal error' /var/log/mindi.log");
    281         tmp = call_program_and_get_last_line_of_output(command);
     281        tmp = call_program_and_get_last_line_of_output(command,TRUE);
    282282        if (strlen(tmp) > 1) {
    283283            popup_and_OK(tmp);
     
    331331    assert_string_is_neither_NULL_nor_zerolength(fname);
    332332    mr_asprintf(command, "which %s 2> /dev/null", fname);
    333     output = call_program_and_get_last_line_of_output(command);
     333    output = call_program_and_get_last_line_of_output(command,TRUE);
    334334    mr_free(command);
    335335    if (output[0] == '\0') {
     
    340340        mr_asprintf(command, "file %s 2> /dev/null | cut -d':' -f1 2> /dev/null", output);
    341341        mr_free(output);
    342         output = call_program_and_get_last_line_of_output(command);
     342        output = call_program_and_get_last_line_of_output(command,TRUE);
    343343        mr_free(command);
    344344    }
     
    346346        mr_asprintf(command, "dirname %s 2> /dev/null", output);
    347347        mr_free(output);
    348         output = call_program_and_get_last_line_of_output(command);
     348        output = call_program_and_get_last_line_of_output(command,TRUE);
    349349        mr_free(command);
    350350    }
     
    429429    if (i < 0) {
    430430        mr_asprintf(command, "tail -n3 %s | grep -Fi %% | tail -n1 | awk '{print $0;}'", filename);
    431         lastline = call_program_and_get_last_line_of_output(command);
     431        lastline = call_program_and_get_last_line_of_output(command,FALSE);
    432432        mr_free(command);
    433433        if (!lastline[0]) {
     
    722722
    723723    log_it(command);
    724     sz_res = call_program_and_get_last_line_of_output(command);
     724    sz_res = call_program_and_get_last_line_of_output(command,TRUE);
    725725    file_len_K = atol(sz_res);
    726726    log_msg(4, "%s --> %s --> %ld", command, sz_res, file_len_K);
     
    779779                    mr_asprintf(command, "ntfsresize --force --info %s|grep '^You might resize at '|cut -d' ' -f5", fname);
    780780                    log_it("command = %s", command);
    781                     tmp = call_program_and_get_last_line_of_output(command);
     781                    tmp = call_program_and_get_last_line_of_output(command,TRUE);
    782782                    mr_free(command);
    783783
     
    10221022    }
    10231023
    1024     tmp = call_program_and_get_last_line_of_output("which mondorestore");
     1024    tmp = call_program_and_get_last_line_of_output("which mondorestore",TRUE);
    10251025    if (!tmp[0]) {
    10261026        mr_free(tmp);
     
    10931093    /* BERLIOS : there is a bug #67 here as it only considers the first NIC */
    10941094    mr_asprintf(command, "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\n' | head -n1 | cut -d' ' -f1");
    1095     netfs_dev = call_program_and_get_last_line_of_output(command);
     1095    netfs_dev = call_program_and_get_last_line_of_output(command,TRUE);
    10961096    mr_free(command);
    10971097
    10981098    mr_asprintf(command, "%s", "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f7 | cut -d':' -f2");
    1099     netfs_client_ipaddr = call_program_and_get_last_line_of_output(command);
     1099    netfs_client_ipaddr = call_program_and_get_last_line_of_output(command,TRUE);
    11001100    mr_free(command);
    11011101
    11021102    mr_asprintf(command, "%s", "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f9 | cut -d':' -f2");
    1103     netfs_client_netmask = call_program_and_get_last_line_of_output(command);
     1103    netfs_client_netmask = call_program_and_get_last_line_of_output(command,TRUE);
    11041104    mr_free(command);
    11051105
    11061106    mr_asprintf(command, "%s", "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f8 | cut -d':' -f2");
    1107     netfs_client_broadcast = call_program_and_get_last_line_of_output(command);
     1107    netfs_client_broadcast = call_program_and_get_last_line_of_output(command,TRUE);
    11081108    mr_free(command);
    11091109
    11101110    mr_asprintf(command, "%s", "route -n | grep '^0.0.0.0' | awk '{print $2}'");
    1111     netfs_client_defgw = call_program_and_get_last_line_of_output(command);
     1111    netfs_client_defgw = call_program_and_get_last_line_of_output(command,TRUE);
    11121112    mr_free(command);
    11131113
     
    11281128        log_to_screen("Found bonding device %s; looking for corresponding ethN slave device\n", netfs_dev);
    11291129        mr_asprintf(command, "%s", "ifconfig %s | awk '{print $5}' | head -n1", netfs_dev);
    1130         mac_addr = call_program_and_get_last_line_of_output(command);
     1130        mac_addr = call_program_and_get_last_line_of_output(command,TRUE);
    11311131        mr_free(command);
    11321132
     
    11351135        mr_free(netfs_dev);
    11361136
    1137         netfs_dev = call_program_and_get_last_line_of_output(command);
     1137        netfs_dev = call_program_and_get_last_line_of_output(command,TRUE);
    11381138        mr_free(command);
    11391139
Note: See TracChangeset for help on using the changeset viewer.