Changeset 2704 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-tools.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-tools.c
r2696 r2704 225 225 d = 5.2; // :-) 226 226 #else 227 tmp = call_program_and_get_last_line_of_output("uname -r" );227 tmp = call_program_and_get_last_line_of_output("uname -r",TRUE); 228 228 p = strchr(tmp, '.'); 229 229 if (p) { … … 476 476 if (getenv ("SUDO_COMMAND")) { 477 477 mr_asprintf(command, "strings `which growisofs` | grep -c SUDO_COMMAND"); 478 tmp = call_program_and_get_last_line_of_output(command );478 tmp = call_program_and_get_last_line_of_output(command,TRUE); 479 479 if (!strcmp(tmp, "1")) { 480 480 mr_free(command); … … 575 575 mr_asprintf(command, "df -P %s | tail -n1 | cut -d' ' -f1", bkpinfo->isodir); 576 576 log_it("command = %s", command); 577 iso_dev = call_program_and_get_last_line_of_output(command );577 iso_dev = call_program_and_get_last_line_of_output(command,TRUE); 578 578 log_it("res of it = %s", iso_dev); 579 579 mr_free(command); … … 583 583 584 584 log_it("command = %s", command); 585 iso_mnt = call_program_and_get_last_line_of_output(command );585 iso_mnt = call_program_and_get_last_line_of_output(command,TRUE); 586 586 log_it("res of it = %s", iso_mnt); 587 587 mr_free(command); … … 858 858 859 859 mr_asprintf(command, "df -m -P %s | tail -n1 | tr -s ' ' '\t' | cut -f4", partition); 860 out_sz = call_program_and_get_last_line_of_output(command );860 out_sz = call_program_and_get_last_line_of_output(command,TRUE); 861 861 mr_free(command); 862 862 … … 900 900 run_program_and_log_output("ln -sf `which mkfs.msdos` /sbin/mkfs.vfat", FALSE); 901 901 } 902 tmp = call_program_and_get_last_line_of_output("free | grep Mem | head -n1 | tr -s ' ' '\t' | cut -f2" );902 tmp = call_program_and_get_last_line_of_output("free | grep Mem | head -n1 | tr -s ' ' '\t' | cut -f2",TRUE); 903 903 if (atol(tmp) < 35000) { 904 904 retval++; … … 961 961 962 962 run_program_and_log_output("umount `mount | grep cdr | cut -d' ' -f3 | tr '\n' ' '`", 5); 963 tmp = call_program_and_get_last_line_of_output("mount | grep -E \"cdr(om|w)\"" );963 tmp = call_program_and_get_last_line_of_output("mount | grep -E \"cdr(om|w)\"",TRUE); 964 964 if (strcmp("", tmp)) { 965 965 if (strstr(tmp, "autofs")) { … … 1046 1046 } else { 1047 1047 mr_asprintf(command, "grep '%s .*' %s| cut -d' ' -f2,3,4,5", label, config_file); 1048 value = call_program_and_get_last_line_of_output(command );1048 value = call_program_and_get_last_line_of_output(command,TRUE); 1049 1049 mr_free(command); 1050 1050 … … 1175 1175 mr_asprintf(command, "%s", "grep -v \":\" /etc/fstab | grep -vE '^#.*$' | grep -E \"[ ]/boot[ ]\" | tr -s ' ' '\t' | cut -f1 | head -n1"); 1176 1176 log_msg(4, "Cool. Command = '%s'", command); 1177 tmp = call_program_and_get_last_line_of_output(command );1177 tmp = call_program_and_get_last_line_of_output(command,TRUE); 1178 1178 mr_free(command); 1179 1179 … … 1182 1182 mr_asprintf(command, "mount | grep -Ew '/boot'"); 1183 1183 mr_free(tmp); 1184 tmp = call_program_and_get_last_line_of_output(command );1184 tmp = call_program_and_get_last_line_of_output(command,TRUE); 1185 1185 mr_free(command); 1186 1186 … … 1381 1381 char *tmp = NULL; 1382 1382 1383 tmp = call_program_and_get_last_line_of_output("ps ax | grep -w magicdev | grep -v grep | tr -s '\t' ' '| cut -d' ' -f6-99" );1383 tmp = call_program_and_get_last_line_of_output("ps ax | grep -w magicdev | grep -v grep | tr -s '\t' ' '| cut -d' ' -f6-99",TRUE); 1384 1384 1385 1385 strcpy(g_magicdev_command, tmp);
Note:
See TracChangeset
for help on using the changeset viewer.