Ignore:
Timestamp:
Dec 17, 2008, 12:59:22 AM (15 years ago)
Author:
Bruno Cornec
Message:
  • Adds support for initrd regeneration at restore time.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.8/mondo/src/mondorestore/mondo-rstr-tools.c

    r2087 r2094  
    13481348}
    13491349
     1350void offer_to_make_initrd() {
     1351
     1352if (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
    13501367
    13511368/**
     
    13891406    paranoid_free(tmp);
    13901407    system("sync");
     1408
     1409    offer_to_make_initrd();
    13911410    if (!strcmp(name, "LILO")) {
    13921411        res = run_lilo(offer_to_hack_scripts);
     
    15061525    }
    15071526    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 ?"))
    15091528        /* interactive mode */
    15101529    {
     
    16131632    strcpy(editor, find_my_editor());
    16141633    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 ?"))
    16161635
    16171636        /* interactive mode */
     
    16871706    strcpy(editor, find_my_editor());
    16881707    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 ?"))
    16901709
    16911710        /* interactive mode */
     
    18001819
    18011820    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 ?"))
    18031822        /* interactive mode */
    18041823    {
     
    24292448    paranoid_free(raidlist);
    24302449}
     2450
     2451
Note: See TracChangeset for help on using the changeset viewer.