Changeset 914 in MondoRescue for trunk/mondo/src/common/libmondo-tools.c
- Timestamp:
- Nov 2, 2006, 2:00:32 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/src/common/libmondo-tools.c
r900 r914 404 404 #else 405 405 tmp = call_program_and_get_last_line_of_output 406 ("free | grep \":\"| tr -s ' ' '\t' | cut -f2 | head -n1");406 ("free | grep ':' | tr -s ' ' '\t' | cut -f2 | head -n1"); 407 407 avm += atol(tmp); 408 408 mr_free(tmp); … … 1110 1110 log_msg(4, "Setting command to something"); 1111 1111 mr_asprintf(&command, 1112 "grep -v \":\" /etc/fstab | grep -vx \"#.*\" | grep -w \"/boot\" | tr -s ' ' '\t' | cut -f1 | head -n1");1112 "grep -v ':' /etc/fstab | grep -vE '^#.*$' | grep -E \"[ ]/boot[ ]\" | tr -s ' ' '\t' | cut -f1 | head -n1"); 1113 1113 log_msg(4, "Cool. Command = '%s'", command); 1114 1114 tmp = call_program_and_get_last_line_of_output(command); … … 1127 1127 } 1128 1128 } else { 1129 mr_asprintf(&command, "mount | grep - w \"%s\"", tmp);1129 mr_asprintf(&command, "mount | grep -E '^%s'", tmp); 1130 1130 log_msg(3, "command = %s", command); 1131 1131 if (run_program_and_log_output(command, 5)) { … … 1215 1215 ("mktemp -q /tmp/mojo-jojo.blah.XXXXXX"); 1216 1216 if (does_file_exist(config_file)) { 1217 mr_asprintf(&command, "grep -v x '%s .*' %s > %s",1217 mr_asprintf(&command, "grep -vE '^%s .*$' %s > %s", 1218 1218 label, config_file, tempfile); 1219 1219 paranoid_system(command);
Note:
See TracChangeset
for help on using the changeset viewer.