Changeset 2950 in MondoRescue
- Timestamp:
- Feb 16, 2012, 1:55:19 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mondo/src/mondorestore/mondo-rstr-tools.c
r2944 r2950 1408 1408 char *editor; 1409 1409 1410 int res ;1410 int res = 0; /* FALSE */ 1411 1411 int done; 1412 bool mntlistchg = FALSE; 1413 FILE *fin = NULL; 1412 1414 1413 1415 malloc_string(command); … … 1438 1440 0, 1439 1441 "Modifying fstab, mtab, device.map and menu.lst/grub.cfg, and running GRUB... "); 1442 /* Did we changed the mountlist ? If yes, then force editing conf files */ 1443 if ((fin = fopen(MONDO_MNTLISTCHG, "r")) != NULL) { 1444 mntlistchg = TRUE; 1445 } 1440 1446 for (done = FALSE; !done;) { 1441 1447 popup_and_get_string("Boot device", 1442 1448 "Please confirm/enter the boot device. If in doubt, try /dev/hda", 1443 1449 boot_device, MAX_STR_LEN / 4); 1444 sprintf(command, "stabgrub-me %s", boot_device); 1445 res = run_program_and_log_output(command, 1); 1446 if (res) { 1447 popup_and_OK 1448 ("GRUB installation failed. You will now edit fstab, mtab, device.map and menu.lst/grub.cfg in order to fix grub install"); 1450 /* Only try to adapt grub here first if the mountlist wasn't changed before */ 1451 if (! mntlistchg) { 1452 sprintf(command, "stabgrub-me %s", boot_device); 1453 res = run_program_and_log_output(command, 1); 1454 } 1455 if ((res) || (mntlistchg)){ 1456 if (res) { 1457 popup_and_OK("GRUB installation failed. You will now edit fstab, mtab, device.map and menu.lst/grub.cfg in order to fix grub install"); 1458 } else { 1459 popup_and_OK("The mountlist was changed. You will now edit fstab, mtab, device.map and menu.lst/grub.cfg in order to fix grub install"); 1460 } 1449 1461 if (!g_text_mode) { 1450 1462 newtSuspend();
Note:
See TracChangeset
for help on using the changeset viewer.