Changeset 914 in MondoRescue for trunk/mondo/src/common
- Timestamp:
- Nov 2, 2006, 2:00:32 AM (17 years ago)
- Location:
- trunk/mondo/src/common
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/src/common/libmondo-archive.c
r900 r914 568 568 569 569 mr_asprintf(&tmp, 570 "echo '%s' | tr -s ' ' '\n' | grep - x '/dev/.*' | tr -s '\n' ' ' | awk '{print $0\"\\n\";}'",570 "echo '%s' | tr -s ' ' '\n' | grep -E '^/dev/.*$' | tr -s '\n' ' ' | awk '{print $0\"\\n\";}'", 571 571 bkpinfo->exclude_paths); 572 572 devs_to_exclude = call_program_and_get_last_line_of_output(tmp); … … 1741 1741 } 1742 1742 pause_for_N_seconds(5, "Letting DVD drive settle"); 1743 mr_asprintf(&sz_blank_disk, "dvd+rw-format %s",1743 mr_asprintf(&sz_blank_disk, "dvd+rw-format -force %s", 1744 1744 bkpinfo->media_device); 1745 1745 log_msg(3, "sz_blank_disk = '%s'", sz_blank_disk); … … 1805 1805 // FIXME --- change mkisofs string to MONDO_MKISOFS_NONBOOTABLE and add ' .' at end 1806 1806 res = eval_call_to_make_ISO(bkpinfo, 1807 "mkisofs -o _ISO_-r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .",1807 "mkisofs -o '_ISO_' -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", 1808 1808 destfile, g_current_media_number, 1809 1809 MONDO_LOGFILE, message_to_screen); … … 1824 1824 #ifdef __IA64__ 1825 1825 log_msg(1, "IA64 --> elilo"); 1826 mr_asprintf(&tmp2,"mkisofs -no-emul-boot -b images/mindi-bootroot.%s.img -c boot.cat -o _ISO_-J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", bkpinfo->mrconf->mindi_ia64_boot_size);1826 mr_asprintf(&tmp2,"mkisofs -no-emul-boot -b images/mindi-bootroot.%s.img -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", bkpinfo->mrconf->mindi_ia64_boot_size); 1827 1827 res = eval_call_to_make_ISO(bkpinfo, 1828 1828 tmp2, … … 1837 1837 log_msg(1, "Non-ia64 --> lilo"); 1838 1838 res = eval_call_to_make_ISO(bkpinfo, 1839 "mkisofs -b images/mindi-bootroot.2880.img -c boot.cat -o _ISO_-J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .",1839 "mkisofs -b images/mindi-bootroot.2880.img -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", 1840 1840 destfile, 1841 1841 g_current_media_number, … … 1847 1847 log_msg(1, "Isolinux"); 1848 1848 res = eval_call_to_make_ISO(bkpinfo, 1849 "mkisofs -no-emul-boot -b isolinux.bin -boot-load-size 4 -boot-info-table -c boot.cat -o _ISO_-J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .",1849 "mkisofs -no-emul-boot -b isolinux.bin -boot-load-size 4 -boot-info-table -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", 1850 1850 destfile, 1851 1851 g_current_media_number, … … 3619 3619 } 3620 3620 mr_asprintf(&tmp, 3621 "grep 'afio: ' %s | sed 's/afio: //' | grep -v x '/dev/.*' >> /tmp/changed.files",3621 "grep 'afio: ' %s | sed 's/afio: //' | grep -vE '^/dev/.*$' >> /tmp/changed.files", 3622 3622 MONDO_LOGFILE); 3623 3623 system(tmp); … … 3625 3625 3626 3626 mr_asprintf(&tmp, 3627 "grep 'star: ' %s | sed 's/star: //' | grep -v x '/dev/.*' >> /tmp/changed.files",3627 "grep 'star: ' %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> /tmp/changed.files", 3628 3628 MONDO_LOGFILE); 3629 3629 system(tmp); -
trunk/mondo/src/common/libmondo-devices.c
r903 r914 1197 1197 paranoid_pclose(fin); 1198 1198 1199 mr_asprintf(&tmp, "%s | grep - w \"%s\" > /dev/null 2> /dev/null",1199 mr_asprintf(&tmp, "%s | grep -E \"^%s\" > /dev/null 2> /dev/null", 1200 1200 SWAPLIST_COMMAND, device_with_space); 1201 1201 mr_free(device_with_space); -
trunk/mondo/src/common/libmondo-filelist.c
r900 r914 516 516 517 517 518 /*519 int set_acl_list(char*masklist, char*acl_fname)520 {521 char*command;522 int retval=0;523 524 if (length_of_file(acl_fname) <= 0) { return(0); }525 log_msg(1, "FIXME - not using masklist");526 malloc_string(command);527 if (find_home_of_exe("setfacl"))528 {529 sprintf(command, "gzip -dc %s | setfacl --restore - 2>> %s", acl_fname, MONDO_LOGFILE);530 log_msg(1, "command = %s", command);531 retval = system(command);532 }533 mr_free(command);534 return(retval);535 }536 */537 538 539 518 int set_EXAT_list(char *orig_msklist, char *original_exat_fname, 540 519 char *executable) … … 689 668 int set_fattr_list(char *masklist, char *fattr_fname) 690 669 { 691 return (set_EXAT_list(masklist, fattr_fname, "setfattr")); 670 if (find_home_of_exe("setfattr")) { 671 return (set_EXAT_list(masklist, fattr_fname, "setfattr")); 672 } else { 673 log_msg(1, "ERROR: set_EXAT_list: setfattr doesn't exist"); 674 return(0); 675 } 692 676 } 693 677 … … 696 680 int set_acl_list(char *masklist, char *acl_fname) 697 681 { 698 return (set_EXAT_list(masklist, acl_fname, "setfacl")); 682 if (find_home_of_exe("setfacl")) { 683 return (set_EXAT_list(masklist, acl_fname, "setfacl")); 684 } else { 685 log_msg(1, "ERROR: set_EXAT_list: setfacl doesn't exist"); 686 return(0); 687 } 699 688 } 700 689 -
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); -
trunk/mondo/src/common/libmondo-verify.c
r900 r914 71 71 log_msg(1, "Now scanning log file for 'afio: ' stuff"); 72 72 mr_asprintf(&command, 73 "grep \"afio: \" %s | sed 's/afio: //' | grep -v x \"/dev/.*\">> %s",73 "grep \"afio: \" %s | sed 's/afio: //' | grep -vE '^/dev/.*$' >> %s", 74 74 stderr_fname, afio_found_changes); 75 75 log_msg(2, command); … … 82 82 log_msg(1, "Now scanning log file for 'star: ' stuff"); 83 83 mr_asprintf(&command, 84 "grep \"star: \" %s | sed 's/star: //' | grep -v x \"/dev/.*\">> %s",84 "grep \"star: \" %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> %s", 85 85 stderr_fname, afio_found_changes); 86 86 log_msg(2, command); … … 1072 1072 (int) (random() % 32767)); 1073 1073 mr_asprintf(&tmp, 1074 "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",1074 "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", 1075 1075 (bkpinfo->use_star) ? "star" : "afio", MONDO_LOGFILE, 1076 1076 changed_files_fname);
Note:
See TracChangeset
for help on using the changeset viewer.