Changeset 2937 in MondoRescue for branches/3.1/mondo/src/mondorestore/mondo-rstr-tools.c
- Timestamp:
- Jan 28, 2012, 1:51:28 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/mondo/src/mondorestore/mondo-rstr-tools.c
r2850 r2937 205 205 return (1); 206 206 } 207 paranoid_system("umount "MNT_CDROM" 2> /dev/null"); /* just in case */207 paranoid_system("umount -d " MNT_CDROM " 2> /dev/null"); /* just in case */ 208 208 209 209 if (is_this_device_mounted(g_isodir_device)) { … … 612 612 } 613 613 } 614 run_program_and_log_output("umount "MNT_CDROM, FALSE);614 run_program_and_log_output("umount -d "MNT_CDROM, FALSE); 615 615 if (!does_file_exist(cfg_file)) { 616 616 log_it("%s",cfg_file); … … 684 684 if (does_file_exist(MNT_CDROM"/archives/filelist.0")) { 685 685 bkpinfo->backup_media_type = cdr; 686 run_program_and_log_output("umount "MNT_CDROM, 1);686 run_program_and_log_output("umount -d "MNT_CDROM, 1); 687 687 log_it 688 688 ("Re-jigging configuration AGAIN. CD-R, not ISO."); … … 1414 1414 if (res) { 1415 1415 popup_and_OK 1416 ("GRUB installation failed. Please install manually using 'grub-install' or similar command. You are now chroot()'ed to your restored system. Please type 'exit' when you are done."); 1417 newtSuspend(); 1418 system("chroot " MNT_RESTORING); 1419 newtResume(); 1420 popup_and_OK("Thank you."); 1416 ("GRUB installation failed. You will now edit fstab, mtab, device.map and menu.lst/grub.cfg in order to fix grub install"); 1417 if (!g_text_mode) { 1418 newtSuspend(); 1419 } 1420 sprintf(tmp, "chroot %s %s /etc/fstab", MNT_RESTORING, editor); 1421 paranoid_system(tmp); 1422 sprintf(tmp, "chroot %s %s /etc/mtab", MNT_RESTORING, editor); 1423 paranoid_system(tmp); 1424 if (does_file_exist(MNT_RESTORING"/boot/grub/menu.lst")) { 1425 sprintf(tmp, "chroot %s %s /boot/grub/menu.lst", MNT_RESTORING, editor); 1426 } else if (does_file_exist(MNT_RESTORING"/boot/grub/grub.cfg")) { 1427 sprintf(tmp, "chroot %s %s /boot/grub/grub.cfg", MNT_RESTORING, editor); 1428 } 1429 paranoid_system(tmp); 1430 sprintf(tmp, "chroot %s %s /boot/grub/device.map", MNT_RESTORING, editor); 1431 paranoid_system(tmp); 1432 if (!g_text_mode) { 1433 newtResume(); 1434 } 1435 sprintf(command, "stabgrub-me %s", boot_device); 1436 res = run_program_and_log_output(command, 1); 1437 if (res) { 1438 popup_and_OK 1439 ("GRUB installation failed. Please fix the conf files so that a manual install using 'grub-install' or similar command works. You are now chroot()'ed to your restored system. Please type 'exit' when you are done."); 1440 newtSuspend(); 1441 system("chroot " MNT_RESTORING); 1442 newtResume(); 1443 popup_and_OK("Thank you."); 1444 } else { 1445 popup_and_OK("GRUB is now installed correctly"); 1446 done = TRUE; 1447 } 1421 1448 } else { 1422 1449 done = TRUE; … … 1933 1960 1934 1961 /* Unmounting the local /proc and /sys first */ 1935 run_program_and_log_output("umount " MNT_RESTORING "/proc",3);1936 run_program_and_log_output("umount " MNT_RESTORING "/sys",3);1962 run_program_and_log_output("umount -d " MNT_RESTORING "/proc",3); 1963 run_program_and_log_output("umount -d " MNT_RESTORING "/sys",3); 1937 1964 1938 1965 for (lino = mountlist->entries - 1; lino >= 0; lino--) { … … 1948 1975 } else { 1949 1976 if (!strcmp(mountlist->el[lino].mountpoint, "/1")) { 1950 mr_asprintf(command, "umount %s/", MNT_RESTORING);1977 mr_asprintf(command, "umount -d %s/", MNT_RESTORING); 1951 1978 log_msg(3, 1952 1979 "Well, I know a certain kitty-kitty who'll be sleeping with Mommy tonight..."); 1953 1980 } else { 1954 mr_asprintf(command, "umount " MNT_RESTORING "%s", mountlist->el[lino].mountpoint);1981 mr_asprintf(command, "umount -d " MNT_RESTORING "%s", mountlist->el[lino].mountpoint); 1955 1982 1956 1983 /* To support latest Ubuntu where /var is a separate FS … … 1998 2025 *END_UNMOUNT_ALL_DEVICES * 1999 2026 **************************************************************************/ 2000 2001 2002 2027 2003 2028 /**************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.