Changeset 2704 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-files.c
- Timestamp:
- Jan 27, 2011, 7:31:24 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-files.c
r2623 r2704 274 274 char *kernel = NULL;; 275 275 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); 277 277 278 278 // If we didn't get anything back, check whether mindi raised a fatal error 279 279 if (!kernel[0]) { 280 280 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); 282 282 if (strlen(tmp) > 1) { 283 283 popup_and_OK(tmp); … … 331 331 assert_string_is_neither_NULL_nor_zerolength(fname); 332 332 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); 334 334 mr_free(command); 335 335 if (output[0] == '\0') { … … 340 340 mr_asprintf(command, "file %s 2> /dev/null | cut -d':' -f1 2> /dev/null", output); 341 341 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); 343 343 mr_free(command); 344 344 } … … 346 346 mr_asprintf(command, "dirname %s 2> /dev/null", output); 347 347 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); 349 349 mr_free(command); 350 350 } … … 429 429 if (i < 0) { 430 430 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); 432 432 mr_free(command); 433 433 if (!lastline[0]) { … … 722 722 723 723 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); 725 725 file_len_K = atol(sz_res); 726 726 log_msg(4, "%s --> %s --> %ld", command, sz_res, file_len_K); … … 779 779 mr_asprintf(command, "ntfsresize --force --info %s|grep '^You might resize at '|cut -d' ' -f5", fname); 780 780 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); 782 782 mr_free(command); 783 783 … … 1022 1022 } 1023 1023 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); 1025 1025 if (!tmp[0]) { 1026 1026 mr_free(tmp); … … 1093 1093 /* BERLIOS : there is a bug #67 here as it only considers the first NIC */ 1094 1094 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); 1096 1096 mr_free(command); 1097 1097 1098 1098 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); 1100 1100 mr_free(command); 1101 1101 1102 1102 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); 1104 1104 mr_free(command); 1105 1105 1106 1106 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); 1108 1108 mr_free(command); 1109 1109 1110 1110 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); 1112 1112 mr_free(command); 1113 1113 … … 1128 1128 log_to_screen("Found bonding device %s; looking for corresponding ethN slave device\n", netfs_dev); 1129 1129 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); 1131 1131 mr_free(command); 1132 1132 … … 1135 1135 mr_free(netfs_dev); 1136 1136 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); 1138 1138 mr_free(command); 1139 1139
Note:
See TracChangeset
for help on using the changeset viewer.