Changeset 2704 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-archive.c
- Timestamp:
- Jan 27, 2011, 7:31:24 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-archive.c
r2644 r2704 612 612 613 613 #ifdef __FreeBSD__ 614 bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'" );614 bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'",TRUE); 615 615 if (!bootdev[0]) { 616 616 mr_free(bootdev); 617 bootdev = call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'" );617 bootdev = call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'",TRUE); 618 618 } 619 619 #else 620 620 /* Linux */ 621 621 #ifdef __IA64__ 622 bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot/efi ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'" );622 bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot/efi ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'",TRUE); 623 623 #else 624 bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'" );624 bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'",TRUE); 625 625 #endif 626 626 if (strstr(bootdev, "/dev/cciss/")) { 627 627 mr_free(bootdev); 628 628 #ifdef __IA64__ 629 bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot/efi ' | head -1 | cut -d' ' -f1 | cut -dp -f1" );629 bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot/efi ' | head -1 | cut -d' ' -f1 | cut -dp -f1",TRUE); 630 630 #else 631 bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | cut -dp -f1" );631 bootdev = call_program_and_get_last_line_of_output("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | cut -dp -f1",TRUE); 632 632 #endif 633 633 } 634 634 if (!bootdev[0]) { 635 635 mr_free(bootdev); 636 bootdev = call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'" );636 bootdev = call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'",TRUE); 637 637 if (strstr(bootdev, "/dev/cciss/")) { 638 638 mr_free(bootdev); 639 bootdev = call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | cut -dp -f1" );639 bootdev = call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | cut -dp -f1",TRUE); 640 640 } 641 641 } … … 840 840 if (!res) { 841 841 log_to_screen("Boot+data disks were created OK"); 842 mr_asprintf(command, "cp -f /%s/ images/mindi.iso %s/mondorescue.iso", MINDI_CACHE_REL, MINDI_CACHE);842 mr_asprintf(command, "cp -f /%s/mindi.iso %s/mondorescue.iso", MINDI_CACHE_REL, MINDI_CACHE); 843 843 log_msg(2, command); 844 844 run_program_and_log_output(command, FALSE); … … 866 866 log_to_screen("Mindi failed to create your boot+data disks."); 867 867 mr_asprintf(command, "grep 'Fatal error' /var/log/mindi.log"); 868 tmp = call_program_and_get_last_line_of_output(command );868 tmp = call_program_and_get_last_line_of_output(command,TRUE); 869 869 mr_free(command); 870 870 … … 1125 1125 mr_asprintf(data_disks_file, "/%s/all.tar.gz", MINDI_CACHE_REL); 1126 1126 1127 g_serial_string = call_program_and_get_last_line_of_output("dd if=/dev/urandom bs=16 count=1 2> /dev/null | hexdump | tr -s ' ' '0' | head -n1" );1127 g_serial_string = call_program_and_get_last_line_of_output("dd if=/dev/urandom bs=16 count=1 2> /dev/null | hexdump | tr -s ' ' '0' | head -n1",TRUE); 1128 1128 mr_strip_spaces(g_serial_string); 1129 1129 mr_strcat(g_serial_string, "...word."); … … 1811 1811 mr_asprintf(command, "dd if=%s bs=512 count=1 2> /dev/null | strings | head -n1", bigfile_fname); 1812 1812 log_msg(1, "command = '%s'", command); 1813 tmp = call_program_and_get_last_line_of_output(command );1813 tmp = call_program_and_get_last_line_of_output(command,TRUE); 1814 1814 mr_free(command); 1815 1815 … … 2544 2544 mr_asprintf(tmp, "cat %s 2> /dev/null", szserfname); 2545 2545 mr_free(our_serial_str); 2546 our_serial_str = call_program_and_get_last_line_of_output(tmp );2546 our_serial_str = call_program_and_get_last_line_of_output(tmp,TRUE); 2547 2547 mr_free(tmp); 2548 2548 // FIXME - should be able to use last_line_of_file(), surely? … … 2733 2733 mr_asprintf(command, "ntfsresize --force --info %s|grep '^You might resize at '|cut -d' ' -f5", biggie_filename); 2734 2734 log_it("command = %s", command); 2735 tmp = call_program_and_get_last_line_of_output(command );2735 tmp = call_program_and_get_last_line_of_output(command,TRUE); 2736 2736 mr_free(command); 2737 2737 log_it("res of it = %s", tmp);
Note:
See TracChangeset
for help on using the changeset viewer.