Changeset 911 in MondoRescue for branches/stable/mondo/src/common
- Timestamp:
- Nov 1, 2006, 7:46:51 PM (19 years ago)
- Location:
- branches/stable/mondo/src/common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-archive.c
r908 r911 736 736 strcpy(scratchdir, bkpinfo->scratchdir); 737 737 sprintf(tmp, 738 "echo '%s' | tr -s ' ' '\n' | grep - x '/dev/.*' | tr -s '\n' ' ' | awk '{print $0\"\\n\";}'",738 "echo '%s' | tr -s ' ' '\n' | grep -E '^/dev/.*$' | tr -s '\n' ' ' | awk '{print $0\"\\n\";}'", 739 739 bkpinfo->exclude_paths); 740 740 strcpy(devs_to_exclude, call_program_and_get_last_line_of_output(tmp)); … … 3884 3884 */ 3885 3885 sprintf(tmp, 3886 "grep 'afio: ' %s | sed 's/afio: //' | grep -v x '/dev/.*' >> /tmp/changed.files",3886 "grep 'afio: ' %s | sed 's/afio: //' | grep -vE '^/dev/.*$' >> /tmp/changed.files", 3887 3887 MONDO_LOGFILE); 3888 3888 system(tmp); 3889 3889 3890 3890 sprintf(tmp, 3891 "grep 'star: ' %s | sed 's/star: //' | grep -v x '/dev/.*' >> /tmp/changed.files",3891 "grep 'star: ' %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> /tmp/changed.files", 3892 3892 MONDO_LOGFILE); 3893 3893 system(tmp); -
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); -
branches/stable/mondo/src/common/libmondo-verify.c
r543 r911 165 165 log_msg(1, "Now scanning log file for 'afio: ' stuff"); 166 166 sprintf(command, 167 "grep \"afio: \" %s | sed 's/afio: //' | grep -v x \"/dev/.*\">> %s",167 "grep \"afio: \" %s | sed 's/afio: //' | grep -vE '^/dev/.*$' >> %s", 168 168 stderr_fname, afio_found_changes); 169 169 log_msg(2, command); … … 175 175 log_msg(1, "Now scanning log file for 'star: ' stuff"); 176 176 sprintf(command, 177 "grep \"star: \" %s | sed 's/star: //' | grep -v x \"/dev/.*\">> %s",177 "grep \"star: \" %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> %s", 178 178 stderr_fname, afio_found_changes); 179 179 log_msg(2, command); … … 1149 1149 (int) (random() % 32767)); 1150 1150 sprintf(tmp, 1151 "grep - x \"%s:.*\" %s | cut -d'\"' -f2 | sort -u | awk '{print \"/\"$0;};' | tr -s '/' '/' | grep -v \"(total of\" | grep -v \"incheckentry.*xwait\" | grep -vx \"/afio:.*\" | grep -vx \"dev/.*\"> %s",1151 "grep -E '^%s:.*$' %s | cut -d'\"' -f2 | sort -u | awk '{print \"/\"$0;};' | tr -s '/' '/' | grep -v \"(total of\" | grep -v \"incheckentry.*xwait\" | grep -vE '^/afio:.*$' | grep -vE '^dev/.*$' > %s", 1152 1152 (bkpinfo->use_star) ? "star" : "afio", MONDO_LOGFILE, 1153 1153 changed_files_fname);
Note:
See TracChangeset
for help on using the changeset viewer.