Changeset 126 in MondoRescue
- Timestamp:
- Nov 19, 2005, 1:53:52 AM (19 years ago)
- Location:
- branches/2.05/mondo/mondo
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.05/mondo/mondo/common/libmondo-archive.c
r99 r126 501 501 paranoid_system (command); 502 502 503 sprintf (command, " cat %s | afio -o -b %ld -M 16m %s %s 2>> %s", filelist, TAPE_BLOCK_SIZE, zipparams, fname, MONDO_LOGFILE);503 sprintf (command, "afio -o -b %ld -M 16m %s %s < %s 2>> %s", TAPE_BLOCK_SIZE, zipparams, fname, filelist, MONDO_LOGFILE); 504 504 505 505 sprintf(tmp, "echo hi > %s 2> /dev/null", fname); … … 701 701 strcpy( scratchdir, bkpinfo->scratchdir); 702 702 sprintf (tmp, 703 "echo \"%s\" | tr -s ' ' '\n' | grep -x \"/dev/.*\"| tr -s '\n' ' ' | awk '{print $0\"\\n\";}'",703 "echo '%s' | tr -s ' ' '\n' | grep -x '/dev/.*' | tr -s '\n' ' ' | awk '{print $0\"\\n\";}'", 704 704 bkpinfo->exclude_paths); 705 705 strcpy (devs_to_exclude, call_program_and_get_last_line_of_output (tmp)); … … 935 935 936 936 937 "mindi --custom %s %s/images \"%s\" \"%s\"\938 \"%s\" %ld \"%s\" \"%s\" \"%s\"\939 \"%s\" %s %ld \"%s\" \"%s\" \"%s\" \"%s\"%ld %d",937 "mindi --custom %s %s/images '%s' '%s' \ 938 '%s' %ld '%s' '%s' '%s' \ 939 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d", 940 940 941 941 bkpinfo->tmpdir, // parameter #2 … … 990 990 { 991 991 log_to_screen ("Mindi failed to create your boot+data disks."); 992 sprintf (command, " cat %s | grep \"Fatal error\"", "/var/log/mindi.log");992 sprintf (command, "grep 'Fatal error' %s", "/var/log/mindi.log"); 993 993 strcpy (tmp, call_program_and_get_last_line_of_output (command)); 994 994 if (strlen (tmp) > 1) … … 1818 1818 { 1819 1819 log_to_screen ("%s...OK", message_to_screen); 1820 if (!run_program_and_log_output("tail -n10 /var/log/mondo-archive.log | fgrep \":-(\"", 1))1820 if (!run_program_and_log_output("tail -n10 /var/log/mondo-archive.log | fgrep ':-('", 1)) 1821 1821 { 1822 1822 log_to_screen("Despite nonfatal errors, growisofs confirms the write was successful."); … … 1825 1825 retval += res; 1826 1826 #ifdef DVDRWFORMAT 1827 sprintf(tmp, " cat %s | tail -n8 | grep \"blank=full.*dvd-compat.*DAO\"", MONDO_LOGFILE);1827 sprintf(tmp, "tail -n8 %s | grep 'blank=full.*dvd-compat.*DAO'", MONDO_LOGFILE); 1828 1828 if (g_backup_media_type == dvd && (res || !run_program_and_log_output(tmp, 1))) 1829 1829 { … … 3262 3262 { 3263 3263 file_to_openin = biggie_filename; 3264 sprintf (command, "md5sum \"%s\"", biggie_filename);3264 sprintf (command, "md5sum '%s'", biggie_filename); 3265 3265 if (!(fin = popen (command, "r"))) { log_OS_error("Unable to popen-in command"); return(1); } 3266 3266 (void) fgets (checksum_line, MAX_STR_LEN, fin); … … 3641 3641 { 3642 3642 log_to_screen 3643 ("Please reboot from the 1st CD in Compare Mode, as a precaution.");3643 ("Please reboot from the 1st %s in Compare Mode, as a precaution.", media_descriptor_string(g_backup_media_type)); 3644 3644 chdir ("/"); 3645 3645 iamhere("Before calling verify_cd_image()"); … … 3793 3793 */ 3794 3794 sprintf (tmp, 3795 " cat %s | grep \"afio: \" | sed 's/afio: //' | grep -vx \"/dev/.*\">> /tmp/changed.files",3795 "sed -n -e 's/afio: //p' %s | grep -vx '/dev/.*' >> /tmp/changed.files", 3796 3796 MONDO_LOGFILE); 3797 3797 system (tmp); 3798 3798 3799 3799 sprintf (tmp, 3800 " cat %s | grep \"star: \" | sed 's/star: //' | grep -vx \"/dev/.*\">> /tmp/changed.files",3800 "sed -n -e 's/star: //p' %s | grep -vx '/dev/.*' >> /tmp/changed.files", 3801 3801 MONDO_LOGFILE); 3802 3802 system (tmp); -
branches/2.05/mondo/mondo/common/libmondo-devices.c
r123 r126 2079 2079 if ((bkpinfo->compression_level = which_compression_level()) == -1) 2080 2080 { log_to_screen("User has chosen not to backup the PC"); finish(1); } 2081 if (!popup_and_get_string ("ISO size.", "Please enter how big you want each ISO image to be (in megabytes). This should be less than or equal to the size of the CD-R[W]'s you plan to backup to.", sz_size, 16))2081 if (!popup_and_get_string ("ISO size.", "Please enter how big you want each ISO image to be (in megabytes). This should be less than or equal to the size of the CD-R[W]'s or DVD's you plan to backup to.", sz_size, 16)) 2082 2082 { log_to_screen ("User has chosen not to backup the PC"); finish(1); } 2083 2083 for(i=0; i<=MAX_NOOF_MEDIA; i++) { bkpinfo->media_size[i] = atoi (sz_size); } -
branches/2.05/mondo/mondo/common/libmondo-files.c
r116 r126 569 569 return (output); 570 570 } 571 sprintf(command, " cat %s | tail -n1", filename);571 sprintf(command, "tail -n1 %s", filename); 572 572 fin = popen(command, "r"); 573 573 (void) fgets(output, MAX_STR_LEN, fin); … … 1309 1309 if (scratchLL <= 1) { 1310 1310 sprintf(tmp, 1311 "Your backup will probably occupy a single CD/tape/ISO. Maybe two."); 1311 "Your backup will probably occupy a single %s. Maybe two.", 1312 media_descriptor_string(bkpinfo->backup_media_type)); 1312 1313 } else if (scratchLL > 4) { 1313 1314 sprintf(tmp, -
branches/2.05/mondo/mondo/common/libmondo-tools.c
r99 r126 422 422 get_time () 423 423 { 424 425 #if 0426 427 /*@ pointers *****************************************************/428 FILE *fin;429 430 /*@ buffers ******************************************************/431 char incoming[MAX_STR_LEN];432 433 /*@ end vars *****************************************************/434 435 if (!(fin = popen ("date +%s", "r"))) { log_OS_error("Cannot popen date"); return(0); }436 fgets (incoming, MAX_STR_LEN - 1, fin);437 paranoid_pclose (fin);438 return (atol (incoming));439 #else440 424 return (long) time ((void *) 0); 441 #endif442 425 } 443 426 -
branches/2.05/mondo/mondo/common/my-stuff.h
r102 r126 345 345 * @c growisofs command to generate a bootable DVD using isolinux, except for the directory to image. 346 346 */ 347 #define MONDO_GROWISOFS_REGULAR_SYSLINUX "growisofs - use-the-force-luke -J -no-emul-boot -boot-load-size 4 -b isolinux.bin --boot-info-table -c boot.cat -boot-load-size 4 -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL_Version -V _CD#_ -v"347 #define MONDO_GROWISOFS_REGULAR_SYSLINUX "growisofs -speed=1 -use-the-force-luke -J -no-emul-boot -boot-load-size 4 -b isolinux.bin --boot-info-table -c boot.cat -boot-load-size 4 -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL_Version -V _CD#_ -v" 348 348 349 349 /** 350 350 * @c growisofs command to generate a bootable DVD using LILO, except for the directory to image. 351 351 */ // -b images/mindi-boot.2880.img 352 #define MONDO_GROWISOFS_REGULAR_ELILO "growisofs - use-the-force-luke -no-emul-boot -b images/mindi-boot.2880.img -c boot.cat -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ -v"352 #define MONDO_GROWISOFS_REGULAR_ELILO "growisofs -speed=1 -use-the-force-luke -no-emul-boot -b images/mindi-boot.2880.img -c boot.cat -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ -v" 353 353 354 354 /** 355 355 * @c growisofs command to generate a bootable DVD using LILO, except for the directory to image. 356 356 */ // -b images/mindi-boot.2880.img 357 #define MONDO_GROWISOFS_REGULAR_LILO "growisofs - no-emul-boot -b isolinux.bin -c boot.cat -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ -v"357 #define MONDO_GROWISOFS_REGULAR_LILO "growisofs -speed=1 -no-emul-boot -b isolinux.bin -c boot.cat -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ -v" 358 358 359 359 /** 360 360 * @c growisofs command to generate a nonbootable DVD, except for the directory to image. 361 361 */ 362 #define MONDO_GROWISOFS_NONBOOT "growisofs - use-the-force-luke -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ -v"362 #define MONDO_GROWISOFS_NONBOOT "growisofs -speed=1 -use-the-force-luke -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ -v" 363 363 364 364 /** -
branches/2.05/mondo/mondo/common/newt-specific.c
r99 r126 562 562 if (grep_for_me[0] != '\0') 563 563 { 564 sprintf (command, "cat %s | grep \"%s\" | tail -n%d", filename, 565 grep_for_me, g_noof_log_lines); 566 } 567 else 568 { 569 sprintf (command, "cat %s | tail -n%d", filename, g_noof_log_lines); 564 sprintf (command, "grep '%s' %s | tail -n%d", 565 grep_for_me, filename, 566 g_noof_log_lines); 567 } 568 else 569 { 570 sprintf (command, "cat %s | tail -n%d %s", g_noof_log_lines, filename); 570 571 } 571 572 fin = popen (command, "r"); -
branches/2.05/mondo/mondo/mondorestore/mondo-prep.c
r88 r126 478 478 { 479 479 strcpy(tmp, call_program_and_get_last_line_of_output 480 (" cat /var/log/mondo-archive.log | tail -n5| grep Insufficient | tail -n1"));480 ("tail -n5 /var/log/mondo-archive.log | grep Insufficient | tail -n1")); 481 481 } 482 482 else 483 483 { 484 484 strcpy(tmp, call_program_and_get_last_line_of_output 485 (" cat /var/log/mondo-archive.log | tail -n5| grep lvcreate | tail -n1"));485 ("tail -n5 /var/log/mondo-archive.log | grep lvcreate | tail -n1")); 486 486 } 487 487 for(p=tmp; *p!='\0' && !isdigit(*p); p++);
Note:
See TracChangeset
for help on using the changeset viewer.