Changeset 3836 in MondoRescue for branches/3.3/mondo/src/common/libmondo-devices.c
- Timestamp:
- Mar 5, 2024, 2:50:53 AM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mondo/src/common/libmondo-devices.c
r3835 r3836 1354 1354 log_msg(2, "Mounting for Network thingy"); 1355 1355 log_msg(2, "isodir = %s", bkpinfo->isodir); 1356 if (( !bkpinfo->isodir[0] || !strcmp(bkpinfo->isodir, "/")) && am_I_in_disaster_recovery_mode()) {1357 strcpy(bkpinfo->isodir, "/tmp/isodir");1356 if ((bkpinfo->isodir == NULL) || !strcmp(bkpinfo->isodir, "/"))) && am_I_in_disaster_recovery_mode()) { 1357 mr_asprintf(bkpinfo->isodir, "%s", "/tmp/isodir"); 1358 1358 log_msg(1, "isodir is being set to %s", bkpinfo->isodir); 1359 1359 } … … 2499 2499 } 2500 2500 mr_asprintf(command, "mount | grep \"%s \" | cut -d' ' -f3", tmp1); 2501 tmp = call_program_and_get_last_line_of_output(command); 2502 strcpy(bkpinfo->isodir, tmp); 2503 mr_free(tmp); 2501 mr_free(bkpinfo->isodir); 2502 bkpinfo->isodir = call_program_and_get_last_line_of_output(command); 2504 2503 mr_free(command); 2505 2504 … … 2566 2565 log_msg(3, "Testing mount for %s", bkpinfo->netfs_mount); 2567 2566 if (is_this_device_mounted(bkpinfo->netfs_mount)) { 2568 tmp = call_program_and_get_last_line_of_output("mount | grep \":\" | cut -d' ' -f3 | head -n1"); 2569 strcpy(bkpinfo->isodir, tmp); 2570 mr_free(tmp); 2567 mr_free(bkpinfo->isodir); 2568 bkpinfo->isodir = call_program_and_get_last_line_of_output("mount | grep \":\" | cut -d' ' -f3 | head -n1"); 2571 2569 } else { 2572 2570 // Why netfsdir ? 2573 snprintf(bkpinfo->isodir, (MAX_STR_LEN / 4) -1, "%s/netfsdir", bkpinfo->tmpdir);2571 mr_asprintf(bkpinfo->isodir, "%s/netfsdir", bkpinfo->tmpdir); 2574 2572 mr_asprintf(command, "mkdir -p %s", bkpinfo->isodir); 2575 2573 run_program_and_log_output(command, 5); … … 2639 2637 case iso: 2640 2638 if (!bkpinfo->disaster_recovery) { 2641 if (!popup_and_get_string("Storage dir.", "Please enter the full path name to the directory for your ISO images. Example: /mnt/raid0_0", bkpinfo->isodir,(MAX_STR_LEN / 4)-1)) { 2639 tmp = mr_popup_and_get_string("Storage dir.", "Please enter the full path name to the directory for your ISO images. Example: /mnt/raid0_0", bkpinfo->isodir); 2640 if (tmp == NULL) { 2642 2641 log_to_screen("User has chosen not to backup the machine"); 2643 2642 finish(1); 2643 } else { 2644 mr_free(bkpinfo->isodir); 2645 bkpinfo->isodir = tmp; 2644 2646 } 2645 2647 if (archiving_to_media) {
Note:
See TracChangeset
for help on using the changeset viewer.