Changeset 2988 in MondoRescue
- Timestamp:
- Apr 4, 2012, 2:26:46 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mondo/src/mondorestore/mondo-prep.c
r2985 r2988 566 566 char *tmp1 = NULL; 567 567 char *oldmd = NULL; 568 char *bootdevice;569 568 char *name; 570 569 char *ver; 571 570 572 malloc_string(bootdevice);573 571 malloc_string(name); 574 572 malloc_string(ver); … … 626 624 // 2) grub bootloader < v1 is used. 627 625 // Otherwise it won't boot which is bad. 628 if (read_cfg_var(g_mondo_cfg_file, "bootloader.device", bootdevice) != 0) {629 log_msg(2, "Unable to find bootloader.device param in %s conf file\n", g_mondo_cfg_file);630 }631 626 if (read_cfg_var(g_mondo_cfg_file, "bootloader.name", name) != 0) { 632 627 log_msg(2, "Unable to find bootloader.name param in %s conf file\n", g_mondo_cfg_file); … … 640 635 if ((strstr(ver, "GRUB 0.9") != NULL) && (strcmp(raidlist->el[i].raid_device,device) == 0)) { 641 636 mr_asprintf(&oldmd, "-e 0.90"); 642 log_it("Forcing old metadata 0.90 for md on %s for old GRUB", device);637 log_it("Forcing old metadata (%s) for md on %s for old GRUB", oldmd, device); 643 638 } else { 644 639 mr_asprintf(&oldmd, ""); … … 646 641 } else if ((strcmp(name,"LILO") == 0) && (strcmp(raidlist->el[i].raid_device,device) == 0)) { 647 642 mr_asprintf(&oldmd, "-e 0.90"); 648 log_it("Forcing old metadata 0.90 for md on %s for LILO", device);643 log_it("Forcing old metadata (%s) for md on %s for LILO", oldmd, device); 649 644 } else { 650 645 mr_asprintf(&oldmd, ""); 651 646 } 652 mr_free(device);653 647 mr_free(name); 654 648 mr_free(ver); … … 660 654 log_msg(4, "cmd built: %s", program); 661 655 // Restoring the UUID stored at backup time of present 662 for (v = 0; v ++ ; v <= raidlist->el[i].additional_vars.entries) {656 for (v = 0; v <= raidlist->el[i].additional_vars.entries ; v++ ) { 663 657 if ((raidlist->el[i].additional_vars.el[v].label != NULL) && (strcmp(raidlist->el[i].additional_vars.el[v].label,"UUID") == 0)) { 664 658 // We have a UUID to handle … … 666 660 // force its restoration in order to avoid modifying all conf files using it 667 661 log_it("Managing previous UUID %s", raidlist->el[i].additional_vars.el[v].value); 668 mr_strcat(program, " --u pdate=uuid --uuid %s",raidlist->el[i].additional_vars.el[v].value);662 mr_strcat(program, " --uuid %s",raidlist->el[i].additional_vars.el[v].value); 669 663 break; 670 664 } else {
Note:
See TracChangeset
for help on using the changeset viewer.