Changeset 3542 in MondoRescue for branches/3.2/mondo/src/mondorestore


Ignore:
Timestamp:
Mar 24, 2016, 5:48:03 PM (8 years ago)
Author:
Bruno Cornec
Message:
  • Rename all mondorestore scripts with the mr- prefix and adapt callers
  • Place these scripts in /usr/bin on the restore media
  • Fix a mindi bug where these scripts were not copied anymore with previous modifications around removal of cd
Location:
branches/3.2/mondo/src/mondorestore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/mondorestore/mondo-prep.c

    r3531 r3542  
    14731473
    14741474    // mark relevant partition as bootable
    1475     mr_asprintf(tmp1,"make-me-bootable /tmp/mountlist.txt %s",drivename);
     1475    mr_asprintf(tmp1,"mr-make-me-bootable /tmp/mountlist.txt %s",drivename);
    14761476    call_program_and_get_last_line_of_output(tmp1);
    14771477    mr_free(tmp1);
  • branches/3.2/mondo/src/mondorestore/mondo-rstr-tools.c

    r3439 r3542  
    591591run_program_and_log_output("touch " MNT_RESTORING "/var/log/pacct", FALSE);
    592592run_program_and_log_output("touch " MNT_RESTORING "/var/account/pacct", FALSE);
    593 if (run_program_and_log_output("ls " MNT_RESTORING " /tmp", FALSE)) {
     593if (run_program_and_log_output("ls -al " MNT_RESTORING " /tmp", FALSE)) {
    594594    run_program_and_log_output("chmod 1777 " MNT_RESTORING "/tmp", FALSE);
    595595}
     
    13991399            /*  Only try to adapt grub here first if the mountlist wasn't changed before */
    14001400            if (! mntlistchg) {
    1401                 mr_asprintf(command, "stabgrub-me %s", boot_device);
     1401                mr_asprintf(command, "mr-stabgrub-me %s", boot_device);
    14021402                res = run_program_and_log_output(command, 1);
    14031403                mr_free(command);
     
    14441444                    newtResume();
    14451445                }
    1446                 mr_asprintf(command, "stabgrub-me %s", boot_device);
     1446                mr_asprintf(command, "mr-stabgrub-me %s", boot_device);
    14471447                res = run_program_and_log_output(command, 1);
    14481448                mr_free(command);
     
    14631463    } else {
    14641464        /* nuke mode */
    1465         if (!run_program_and_log_output("which grub-MR", FALSE)) {
    1466             log_msg(1, "Yay! grub-MR found...");
    1467             mr_asprintf(command, "grub-MR %s /"MOUNTLIST_FNAME_STUB, boot_device);
     1465        if (!run_program_and_log_output("which mr-grub", FALSE)) {
     1466            log_msg(1, "Yay! mr-grub found...");
     1467            mr_asprintf(command, "mr-grub %s /"MOUNTLIST_FNAME_STUB, boot_device);
    14681468            log_msg(1, "command = %s", command);
    14691469        } else {
    14701470            // Or grub2-install
    14711471            mr_asprintf(command, "chroot " MNT_RESTORING " grub-install %s", boot_device);
    1472             log_msg(1, "WARNING - grub-MR not found; using grub-install");
     1472            log_msg(1, "WARNING - mr-grub not found; using grub-install");
    14731473        }
    14741474        mvaddstr_and_log_it(g_currentY, 0, "Running GRUB...                                                 ");
     
    14891489            ("GRUB ran w/error(s). See %s for more info.", MONDO_LOGFILE);
    14901490        log_msg(1, "Type:-");
    1491         log_msg(1, "    mount-me");
     1491        log_msg(1, "    mr-mount-me");
    14921492        log_msg(1, "    chroot " MNT_RESTORING);
    14931493        log_msg(1, "    mount /boot");
    14941494        log_msg(1, "    grub-install '(hd0)'");
    14951495        log_msg(1, "    exit");
    1496         log_msg(1, "    unmount-me");
     1496        log_msg(1, "    mr-unmount-me");
    14971497        log_msg(1,
    14981498                "If you're really stuck, please e-mail the mailing list.");
     
    15331533                            0,
    15341534                            "Modifying fstab and elilo.conf...                             ");
    1535         mr_asprintf(command, "stabelilo-me");
     1535        mr_asprintf(command, "mr-stabelilo-me");
    15361536        res = run_program_and_log_output(command, 3);
    15371537        mr_free(command);
     
    16091609                            0,
    16101610                            "Modifying fstab and lilo.conf, and running LILO...                             ");
    1611         mr_asprintf(command, "stablilo-me");
     1611        mr_asprintf(command, "mr-stablilo-me");
    16121612        res = run_program_and_log_output(command, 3);
    16131613        mr_free(command);
     
    17351735            }
    17361736            popup_and_get_string("Boot device", "Please confirm/enter the boot device. If in doubt, try /dev/hda", boot_device, MAX_STR_LEN / 4);
    1737             mr_asprintf(command, "stabraw-me %s", boot_device);
     1737            mr_asprintf(command, "mr-stabraw-me %s", boot_device);
    17381738            res = run_program_and_log_output(command, 3);
    17391739            mr_free(command);
     
    17471747    } else {
    17481748        /* nuke mode */
    1749         mr_asprintf(command, "raw-MR %s /"MOUNTLIST_FNAME_STUB, boot_device);
     1749        mr_asprintf(command, "mr-raw %s /"MOUNTLIST_FNAME_STUB, boot_device);
    17501750        log_msg(2, "run_raw_mbr() --- command='%s'", command);
    17511751
  • branches/3.2/mondo/src/mondorestore/mondorestore.c

    r3510 r3542  
    20452045            mr_asprintf(fstab_fname, "/tmp/fstab");
    20462046        }
    2047         mr_asprintf(tmp1, "label-partitions-as-necessary %s < %s >> %s 2>> %s", g_mountlist_fname, fstab_fname, MONDO_LOGFILE, MONDO_LOGFILE);
     2047        mr_asprintf(tmp1, "mr-label-partitions-as-necessary %s < %s >> %s 2>> %s", g_mountlist_fname, fstab_fname, MONDO_LOGFILE, MONDO_LOGFILE);
    20482048        mr_free(fstab_fname);
    20492049
     
    20512051        mr_free(tmp1);
    20522052        if (res) {
    2053             log_to_screen("label-partitions-as-necessary returned an error");
     2053            log_to_screen("mr-label-partitions-as-necessary returned an error");
    20542054            mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
    20552055        } else {
     
    21912191    mvaddstr_and_log_it(g_currentY, 0, "Using tune2fs/tune4fs to identify your ext2,3,4 partitions");
    21922192
    2193     mr_asprintf(tmp1, "label-partitions-as-necessary %s < /tmp/fstab >> %s 2>> %s", "/tmp/mountlist.txt", MONDO_LOGFILE, MONDO_LOGFILE);
     2193    mr_asprintf(tmp1, "mr-label-partitions-as-necessary %s < /tmp/fstab >> %s 2>> %s", "/tmp/mountlist.txt", MONDO_LOGFILE, MONDO_LOGFILE);
    21942194    res = run_program_and_log_output(tmp1, TRUE);
    21952195    mr_free(tmp1);
    21962196    if (res) {
    2197         log_to_screen("label-partitions-as-necessary returned an error");
     2197        log_to_screen("mr-label-partitions-as-necessary returned an error");
    21982198        mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
    21992199    } else {
Note: See TracChangeset for help on using the changeset viewer.