Changeset 3892 in MondoRescue for branches/3.3/mondo/src/common/libmondo-devices.c
- Timestamp:
- Mar 12, 2024, 3:10:24 AM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mondo/src/common/libmondo-devices.c
r3889 r3892 443 443 mr_free(mount_list); 444 444 445 mr_asprintf(command, "%s", "cat /proc/mdstat|grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'");445 mr_asprintf(command, "%s", "cat " MDSTAT_FILE " |grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'"); 446 446 log_msg (5, "Running: %s", command); 447 447 mount_list = call_program_and_get_last_line_of_output(command); … … 499 499 500 500 /* Get the Software raid device list */ 501 mr_asprintf(command, "%s", "cat /proc/mdstat|grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'");501 mr_asprintf(command, "%s", "cat " MDSTAT_FILE " | grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'"); 502 502 log_msg (5, " Running: %s", command); 503 503 mount_list = call_program_and_get_last_line_of_output(command); … … 788 788 bool does_nonMS_partition_exist(void) 789 789 { 790 #if __FreeBSD__790 #ifdef __FreeBSD__ 791 791 return 792 792 !system("for drive in /dev/ad? /dev/da?; do fdisk $drive | grep -q FreeBSD && exit 0; done; false"); … … 2136 2136 2137 2137 case udev: 2138 if (!ask_me_yes_or_no 2139 ("This option is for advanced users only. Are you sure?")) { 2138 if (!ask_me_yes_or_no("This option is for advanced users only. Are you sure?")) { 2140 2139 log_to_screen("User has chosen not to backup the machine"); 2141 2140 finish(1); 2142 2141 } 2142 break; 2143 2143 2144 case tape: 2144 2145 … … 2483 2484 // NTFS 2484 2485 tmp = call_program_and_get_last_line_of_output("mr-parted2fdisk -l 2>/dev/null | grep -i ntfs | awk '{ print $1};' | tr -s '\\n' ' ' | awk '{ print $0};'"); 2485 strncpy(tmp1, tmp,(MAX_STR_LEN / 4)-1); 2486 if (strlen(tmp) > 2) { 2487 tmp1 = mr_popup_and_get_string("NTFS partitions", "Please enter/confirm the NTFS partitions you wish to backup as well.", tmp); 2488 if (tmp1 == NULL) { 2489 log_to_screen("User has chosen not to backup the machine"); 2490 mr_free(tmp); 2491 mr_free(tmp1); 2492 finish(1); 2493 } 2494 mr_free(bkpinfo->image_devs); 2495 bkpinfo->image_devs = tmp1; 2496 } 2486 2497 mr_free(tmp); 2487 if (strlen(tmp1) > 2) {2488 if (!popup_and_get_string("NTFS partitions", "Please enter/confirm the NTFS partitions you wish to backup as well.", tmp1,(MAX_STR_LEN / 4)-1)) {2489 log_to_screen("User has chosen not to backup the machine");2490 finish(1);2491 }2492 mr_asprintf(bkpinfo->image_devs, "%s", tmp1);2493 }2494 2498 2495 2499 if (bkpinfo->exclude_paths != NULL ) { … … 2572 2576 mr_free(compression_type); 2573 2577 2578 #ifdef __FreeBSD__ 2574 2579 #if __FreeBSD__ == 5 2575 2580 mr_asprintf(bkpinfo->kernel_path, "%s", "/boot/kernel/kernel"); 2576 2581 #elif __FreeBSD__ == 4 2577 2582 mr_asprintf(bkpinfo->kernel_path, "%s", "/kernel"); 2583 #endif 2578 2584 #elif linux 2579 2585 if (figure_out_kernel_path_interactively_if_necessary(bkpinfo->kernel_path)) {
Note:
See TracChangeset
for help on using the changeset viewer.