Changeset 3278 in MondoRescue for branches/3.2/mondo/src/common
- Timestamp:
- Apr 30, 2014, 12:30:11 PM (11 years ago)
- Location:
- branches/3.2/mondo/src/common
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/common/libmondo-archive.c
r3208 r3278 684 684 } 685 685 mr_asprintf(bootldr_ver, "%s", call_program_and_get_last_line_of_output("grub --version")); 686 if (strcmp(bootldr_ver,"") ==0) { 687 mf_free(bootldr_ver); 688 mr_asprintf(bootldr_ver, "%s", call_program_and_get_last_line_of_output("grub2-install --version")); 689 } 686 690 } else if (bkpinfo->boot_loader == 'E') { 687 691 mr_asprintf(bootldr_str, "ELILO"); -
branches/3.2/mondo/src/common/libmondo-devices.c
r3271 r3278 2501 2501 strcpy(bkpinfo->isodir, call_program_and_get_last_line_of_output("mount | grep \":\" | cut -d' ' -f3 | head -n1")); 2502 2502 } else { 2503 // Why netfsdir ? 2503 2504 sprintf(bkpinfo->isodir, "%s/netfsdir", bkpinfo->tmpdir); 2504 2505 mr_asprintf(command, "mkdir -p %s", bkpinfo->isodir); -
branches/3.2/mondo/src/common/libmondo-files.c
r3272 r3278 1086 1086 * @param bkpinfo The backup information structure. Fields used: 1087 1087 * - @c netfs_mount 1088 * - @c netfs_remote_dir1089 1088 * - @c tmpdir 1090 1089 */ … … 1095 1094 char *netfs_dev = NULL; 1096 1095 char *netfs_client_hwaddr = NULL; 1097 char *netfs_mount = NULL;1098 char *netfs_client_ipaddr = NULL;1099 char *netfs_client_netmask = NULL;1100 char *netfs_client_broadcast = NULL;1101 char *netfs_client_defgw = NULL;1102 char *netfs_server_ipaddr = NULL;1103 char *tmp = NULL;1104 1096 char *command = NULL; 1105 1106 /*@ pointers ***** */1107 char *p;1108 1109 if (bkpinfo->netfs_mount == NULL) {1110 fatal_error("No netfs_mount found !");1111 }1112 1113 log_it("Storing Network configuration");1114 1097 1115 1098 /******** -
branches/3.2/mondo/src/common/libmondo-tools.c
r3268 r3278 351 351 char *mondo_mkisofs_sz = NULL; 352 352 char *command = NULL; 353 char *hostname = NULL;354 353 char *isofs_cmd = NULL; 355 char *ip_address = NULL;356 354 int retval = 0; 357 char *colon;358 355 char *cdr_exe = NULL; 359 356 char *tmp = NULL; … … 362 359 char *iso_mnt = NULL; 363 360 char *iso_tmp = NULL; 364 char *iso_path = NULL; 365 char *cfg_fname = NULL; 361 char *iso_dir = NULL; 366 362 367 363 assert(bkpinfo != NULL); … … 532 528 if (bkpinfo->backup_media_type == iso) { 533 529 534 /* Patch by Conor Daly <conor.daly@met.ie> 535 * 23-june-2004 536 * Break up isodir into iso_mnt and iso_path 530 /* Break up isodir into iso_mnt and iso_dir 537 531 * These will be used along with iso-dev at restore time 538 532 * to locate the ISOs where ever they're mounted … … 560 554 mr_free(command); 561 555 562 log_it("iso mnt: %s, %d", iso_mnt, strlen(iso_mnt));556 log_it("iso_mnt: %s, %d", iso_mnt, strlen(iso_mnt)); 563 557 mr_asprintf(iso_tmp, "%s", bkpinfo->isodir); 564 558 if (strlen(iso_tmp) < strlen(iso_mnt)) { 565 mr_asprintf(iso_ path, "%s", "");559 mr_asprintf(iso_dir, "%s", ""); 566 560 } else { 567 // If iso_mnt is only / then iso_ pathis the full dir561 // If iso_mnt is only / then iso_dir is the full dir 568 562 // (the formula bellow doesn't work in this case) 569 563 if (strcmp(iso_mnt, "/") == 0) { 570 mr_asprintf(iso_ path, "%s", iso_tmp);564 mr_asprintf(iso_dir, "%s", iso_tmp); 571 565 // else it's a part of iso_tmp 572 566 } else { 573 mr_asprintf(iso_ path, "%s", iso_tmp + strlen(iso_mnt));567 mr_asprintf(iso_dir, "%s", iso_tmp + strlen(iso_mnt)); 574 568 } 575 569 } … … 577 571 mr_free(iso_tmp); 578 572 579 mr_asprintf(tmp, "%s/ISO DIR", bkpinfo->tmpdir);580 write_one_liner_data_file(tmp, iso_ path);581 mr_free(tmp); 582 583 log_it("iso dir: %s", iso_path);584 mr_free(iso_ path);573 mr_asprintf(tmp, "%s/ISO-DIR", bkpinfo->tmpdir); 574 write_one_liner_data_file(tmp, iso_dir); 575 mr_free(tmp); 576 577 log_it("iso-dir: %s", iso_dir); 578 mr_free(iso_dir); 585 579 586 580 mr_asprintf(tmp, "%s/ISO-PREFIX", bkpinfo->tmpdir); … … 596 590 mr_asprintf(tmp, "%s/ISO-PREFIX", bkpinfo->tmpdir); 597 591 write_one_liner_data_file(tmp, bkpinfo->prefix); 592 mr_free(tmp); 593 594 mr_asprintf(tmp, "%s/ISO-MNT", bkpinfo->tmpdir); 595 write_one_liner_data_file(tmp, bkpinfo->isodir); 596 mr_free(tmp); 597 598 mr_asprintf(tmp, "%s/ISO-DIR", bkpinfo->tmpdir); 599 write_one_liner_data_file(tmp, bkpinfo->netfs_remote_dir); 598 600 mr_free(tmp); 599 601 -
branches/3.2/mondo/src/common/mondostructures.h
r3273 r3278 455 455 * The directory we're backing up to. 456 456 * If backup_media_type is @b iso, then this is that directory. 457 * If backup_media_type is @b netfs, then this is the directory where the share is mounted. 457 458 * If backup_media_type is anything else, this is ignored. 458 459 */
Note:
See TracChangeset
for help on using the changeset viewer.