Changeset 911 in MondoRescue for branches/stable/mondo/src/common/libmondo-tools.c
- Timestamp:
- Nov 1, 2006, 7:46:51 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-tools.c
r909 r911 625 625 strcpy(tmp, 626 626 call_program_and_get_last_line_of_output 627 ("free | grep \":\"| tr -s ' ' '\t' | cut -f2 | head -n1"));627 ("free | grep ':' | tr -s ' ' '\t' | cut -f2 | head -n1")); 628 628 avm += atol(tmp); 629 629 sprintf(command, "mount /dev/shm -t tmpfs %s -o size=%d%c", … … 1396 1396 log_msg(4, "Done. Great. Seeting command to something"); 1397 1397 strcpy(command, 1398 "grep -v \":\" /etc/fstab | grep -v x \"#.*\"| grep -E \"[ ]/boot[ ]\" | tr -s ' ' '\t' | cut -f1 | head -n1");1398 "grep -v \":\" /etc/fstab | grep -vE '^#.*$' | grep -E \"[ ]/boot[ ]\" | tr -s ' ' '\t' | cut -f1 | head -n1"); 1399 1399 log_msg(4, "Cool. Command = '%s'", command); 1400 1400 strcpy(tmp, call_program_and_get_last_line_of_output(command)); … … 1410 1410 } 1411 1411 } else { 1412 sprintf(command, "mount | grep -E \"^%s\"", tmp);1412 sprintf(command, "mount | grep -E '^%s'", tmp); 1413 1413 log_msg(3, "command = %s", command); 1414 1414 if (run_program_and_log_output(command, 5)) { … … 1486 1486 ("mktemp -q /tmp/mojo-jojo.blah.XXXXXX")); 1487 1487 if (does_file_exist(config_file)) { 1488 sprintf(command, "grep -v x '%s .*' %s > %s",1488 sprintf(command, "grep -vE '^%s .*$' %s > %s", 1489 1489 label, config_file, tempfile); 1490 1490 paranoid_system(command);
Note:
See TracChangeset
for help on using the changeset viewer.