Changeset 2094 in MondoRescue
- Timestamp:
- Dec 17, 2008, 12:59:22 AM (16 years ago)
- Location:
- branches/2.2.8/mondo/src/mondorestore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.8/mondo/src/mondorestore/mondo-rstr-newt.c
r2080 r2094 1 1 /*************************************************************************** 2 mondo-rstr-newt.c - description 3 ----------------- 4 5 begin: Fri Apr 19 16:40:35 EDT 2002 6 copyright : (C) 2002 Mondo Hugo Rabson 7 email : Hugo Rabson <hugorabson@msn.com> 8 edited by : by Stan Benoit 4/2002 9 email : troff@nakedsoul.org 10 cvsid : $Id$ 11 ***************************************************************************/ 12 13 /*************************************************************************** 14 * * 15 * This program is free software; you can redistribute it and/or modify * 16 * it under the terms of the GNU General Public License as published by * 17 * the Free Software Foundation; either version 2 of the License, or * 18 * (at your option) any later version. * 19 * * 20 ***************************************************************************/ 21 /* mondo-rstr-newt.c Hugo Rabson 22 23 24 07/12 25 - wider mountlist entry editor window 26 27 03/28/2004 28 - removed g_mountlist_fname 29 30 07/02/2003 31 - fixed calls to popup_and_get_string() 32 33 06/05 34 - cleaned up get_isodir_info() 35 36 05/02 37 - added strip_path() to improve file list display for long paths (Conor) 38 39 04/24 40 - added lots of assert()'s and log_OS_error()'s 41 42 04/08/2003 43 - commented out call to sort_mountlist_by_device(), just in case it's 44 futzing with LVM/RAID users 45 46 08/21/2002 47 - fix MOUNTLIST_FNAME and RAIDTAB_FNAME if Reload button finds them empty 48 49 08/19 50 - fixed what_number_cd_is_this() to take bkpinfo as parameter 51 52 07/01 - 07/31 53 - renamed from mondo-newt.c to mondo-rstr-newt.c 54 - moved lots of subroutines to libmondo-newt.c 55 - added hooks to libmondo 56 - better handling of yes/no/YES/NO 57 - better "% done" feedback (Philippe de Muyter) 58 59 05/01 - 06/30 60 - trim trailing \n from fgets() in a couple of functions 61 - expanded "May I write mountlist?" message 62 - replace scanf() with a properly restricted fgets() (Troff) 63 64 02/01 - 02/28/2002 65 - allow up to 50 chars in popup_and_get_string()'s input field 66 - if g_current_progress > g_maximum_progress then g_current_progress=g_max... 67 to stop the progress bar from shooting off the RHS of the screen :) 68 - beefed up the RAID-related logging a bit 69 - don't complain if partition format is a number (1-255) 70 - if hard disk does not exist then warn user when editing mountlist 71 - when running 'eject -t', log its output 72 73 [...] 74 75 08/09/2001 76 - created 77 */ 2 * $Id$ 3 */ 78 4 79 5 -
branches/2.2.8/mondo/src/mondorestore/mondo-rstr-tools.c
r2087 r2094 1348 1348 } 1349 1349 1350 void offer_to_make_initrd() { 1351 1352 if (bkpinfo->restore_mode != nuke) { 1353 if (!ask_me_yes_or_no 1354 ("You will now be able to re-generate your initrd.\nThis specially useful if you changed of hardware configuration, cloned, made P2V, used multipath... Do you need to do it ?")) { 1355 return; 1356 } 1357 popup_and_OK("You'll now be chrooted under your future / partition.\nGo under /boot and rebuild your initrd with\nmkinitrd -f -v initrd-2.x.y.img 2.x.y e.g.\nThen type exit to finish."); 1358 newtSuspend(); 1359 (void)system("chroot " MNT_RESTORING); 1360 newtResume(); 1361 } else { 1362 log_to_screen("Non-interactive mode: no way to give you the keyboard so that you re-generate your initrd. Hope it's OK"); 1363 log_msg(1,"Non-interactive mode: no way to give you the keyboard so that you re-generate your initrd. Hope it's OK"); 1364 } 1365 } 1366 1350 1367 1351 1368 /** … … 1389 1406 paranoid_free(tmp); 1390 1407 system("sync"); 1408 1409 offer_to_make_initrd(); 1391 1410 if (!strcmp(name, "LILO")) { 1392 1411 res = run_lilo(offer_to_hack_scripts); … … 1506 1525 } 1507 1526 if (offer_to_run_stabgrub 1508 && ask_me_yes_or_no("Did you change the mountlist ?"))1527 && ask_me_yes_or_no("Did you change the mountlist or cloned the system ?")) 1509 1528 /* interactive mode */ 1510 1529 { … … 1613 1632 strcpy(editor, find_my_editor()); 1614 1633 if (offer_to_run_stabelilo 1615 && ask_me_yes_or_no("Did you change the mountlist ?"))1634 && ask_me_yes_or_no("Did you change the mountlist or cloned the system ?")) 1616 1635 1617 1636 /* interactive mode */ … … 1687 1706 strcpy(editor, find_my_editor()); 1688 1707 if (offer_to_run_stablilo 1689 && ask_me_yes_or_no("Did you change the mountlist ?"))1708 && ask_me_yes_or_no("Did you change the mountlist or cloned the system ?")) 1690 1709 1691 1710 /* interactive mode */ … … 1800 1819 1801 1820 if (offer_to_hack_scripts 1802 && ask_me_yes_or_no("Did you change the mountlist ?"))1821 && ask_me_yes_or_no("Did you change the mountlist or cloned the system ?")) 1803 1822 /* interactive mode */ 1804 1823 { … … 2429 2448 paranoid_free(raidlist); 2430 2449 } 2450 2451 -
branches/2.2.8/mondo/src/mondorestore/mondorestore.c
r2087 r2094 391 391 asprintf(&editor, "%s", find_my_editor()); 392 392 asprintf(&tmp1,"chroot %s %s /etc/multipath.conf", MNT_RESTORING, editor); 393 popup_and_OK("You will now edit multipath.conf"); 394 if (!g_text_mode) { 395 newtSuspend(); 396 } 393 397 paranoid_system(tmp1); 394 398 paranoid_free(tmp1); … … 630 634 } 631 635 636 clean_multiconf(); 632 637 if (ask_me_yes_or_no("Initialize the boot loader?")) { 633 638 run_boot_loader(TRUE); … … 639 644 640 645 clean_blkid(); 641 clean_multiconf();642 646 protect_against_braindead_sysadmins(); 643 647 retval += unmount_all_devices(mountlist); … … 867 871 iamhere("Restoring everything"); 868 872 retval += restore_everything(NULL); 873 clean_multiconf(); 869 874 if (!run_boot_loader(FALSE)) { 870 875 log_msg(1, … … 873 878 } 874 879 clean_blkid(); 875 clean_multiconf();876 880 protect_against_braindead_sysadmins(); 877 881 retval += unmount_all_devices(mountlist); … … 2818 2822 bool run_postnuke = FALSE; 2819 2823 2820 /**************************************************************************2821 * hugo- *2822 * busy stuff here - it needs some comments -stan *2823 * *2824 **************************************************************************/2825 2824 if (getuid() != 0) { 2826 2825 fprintf(stderr, "Please run as root.\r\n");
Note:
See TracChangeset
for help on using the changeset viewer.