Ignore:
Timestamp:
Feb 2, 2007, 11:21:27 PM (17 years ago)
Author:
Bruno Cornec
Message:

log_msg => mr_msg in trunk

File:
1 edited

Legend:

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

    r1084 r1086  
    194194        || (!does_file_exist(output_mountlist_file)
    195195            && does_file_exist(orig_fname))) {
    196         log_msg(2, "Failed to extract %s and/or %s from ramdisk",
     196        mr_msg(2, "Failed to extract %s and/or %s from ramdisk",
    197197                output_cfg_file, output_mountlist_file);
    198198        retval = 1;
     
    257257            "Checking to see if f=%s, file=%s, is in the list of biggiefiles",
    258258            f, file);
    259     log_msg(2, tmp);
     259    mr_msg(2, tmp);
    260260    mr_free(tmp);
    261261
     
    308308        run_program_and_log_output(command, 5);
    309309        mr_free(command);
    310         log_msg(2, "Setting isodir to %s", bkpinfo->isodir);
     310        mr_msg(2, "Setting isodir to %s", bkpinfo->isodir);
    311311    }
    312312
     
    331331                "The 'mount' command is '%s'. PLEASE report this command to be if you have problems, ok?",
    332332                mount_isodir_command);
    333         log_msg(1, tmp);
     333        mr_msg(1, tmp);
    334334        mr_free(tmp);
    335335
     
    352352    mr_asprintf(&tmp, "%s #%d has been mounted via loopback mount",
    353353            bkpinfo->backup_media_string, i);
    354     log_msg(1, tmp);
     354    mr_msg(1, tmp);
    355355    mr_free(tmp);
    356356
     
    360360        retval = 1;
    361361    }
    362     log_msg(2, "%ld: bkpinfo->isodir is now %s", __LINE__,
     362    mr_msg(2, "%ld: bkpinfo->isodir is now %s", __LINE__,
    363363            bkpinfo->isodir);
    364364    return (retval);
     
    409409    if (!strcmp(mpt, "/1")) {
    410410        mr_asprintf(&mountpoint, "/");
    411         log_msg(3, "Mommm! SME is being a dildo!");
     411        mr_msg(3, "Mommm! SME is being a dildo!");
    412412    } else {
    413413        mr_asprintf(&mountpoint, mpt);
     
    423423    }
    424424    mr_asprintf(&tmp, "Mounting device %s   ", device);
    425     log_msg(1, tmp);
     425    mr_msg(1, tmp);
    426426
    427427    if (writeable) {
     
    465465        mr_asprintf(&command, "mount -t %s %s %s %s 2>> %s", format, device,
    466466                additional_parameters, mountdir, MONDO_LOGFILE);
    467         log_msg(2, "command='%s'", command);
     467        mr_msg(2, "command='%s'", command);
    468468    }
    469469    mr_free(additional_parameters);
     
    471471    res = run_program_and_log_output(command, TRUE);
    472472    if (res && (strstr(command, "xattr") || strstr(command, "acl"))) {
    473         log_msg(1, "Re-trying without the fancy extra parameters");
     473        mr_msg(1, "Re-trying without the fancy extra parameters");
    474474        mr_free(command);
    475475
     
    479479    }
    480480    if (res) {
    481         log_msg(1, "Unable to mount device %s (type %s) at %s", device,
     481        mr_msg(1, "Unable to mount device %s (type %s) at %s", device,
    482482                format, mountdir);
    483         log_msg(1, "command was '%s'", command);
     483        mr_msg(1, "command was '%s'", command);
    484484        if (!strcmp(mountpoint, "swap")) {
    485485            log_to_screen(tmp);
    486486        } else {
    487             log_msg(2, "Retrying w/o the '-t' switch");
     487            mr_msg(2, "Retrying w/o the '-t' switch");
    488488            mr_free(command);
    489489
    490490            mr_asprintf(&command, "mount %s %s 2>> %s", device, mountdir,
    491491                    MONDO_LOGFILE);
    492             log_msg(2, "2nd command = '%s'", command);
     492            mr_msg(2, "2nd command = '%s'", command);
    493493            res = run_program_and_log_output(command, TRUE);
    494494            if (res == 0) {
    495                 log_msg(1,
     495                mr_msg(1,
    496496                        "That's OK. I called mount w/o a filesystem type and it worked fine in the end.");
    497497            } else {
     
    505505
    506506    if (res && !strcmp(mountpoint, "swap")) {
    507         log_msg(2, "That's ok. It's just a swap partition.");
    508         log_msg(2, "Non-fatal error. Returning 0.");
     507        mr_msg(2, "That's ok. It's just a swap partition.");
     508        mr_msg(2, "Non-fatal error. Returning 0.");
    509509        res = 0;
    510510    }
     
    550550    for (lino = 0; lino < mountlist->entries; lino++) {
    551551        if (!strcmp(mountlist->el[lino].device, "/proc")) {
    552             log_msg(1,
     552            mr_msg(1,
    553553                    "Again with the /proc - why is this in your mountlist?");
    554554        } else if (is_this_device_mounted(mountlist->el[lino].device)) {
     
    649649    if (bkpinfo->backup_media_type == tape
    650650        || bkpinfo->backup_media_type == udev) {
    651         log_msg(8, "Tape/udev. Therefore, no need to mount CDROM.");
     651        mr_msg(8, "Tape/udev. Therefore, no need to mount CDROM.");
    652652        return 0;
    653653    }
    654654
    655655    if (!run_program_and_log_output("mount | grep -F " MNT_CDROM, FALSE)) {
    656         log_msg(2, "mount_cdrom() - CD already mounted. Fair enough.");
     656        mr_msg(2, "mount_cdrom() - CD already mounted. Fair enough.");
    657657        return (0);
    658658    }
    659659
    660660    if (bkpinfo->backup_media_type == nfs) {
    661         log_msg(2, "Mounting for NFS thingy");
    662         log_msg(2, "isodir = %s", bkpinfo->isodir);
     661        mr_msg(2, "Mounting for NFS thingy");
     662        mr_msg(2, "isodir = %s", bkpinfo->isodir);
    663663        if ((!bkpinfo->isodir || !strcmp(bkpinfo->isodir, "/"))
    664664            && am_I_in_disaster_recovery_mode()) {
    665665            mr_allocstr(bkpinfo->isodir, "/tmp/isodir");
    666             log_msg(1, "isodir is being set to %s", bkpinfo->isodir);
     666            mr_msg(1, "isodir is being set to %s", bkpinfo->isodir);
    667667        }
    668668#ifdef __FreeBSD__
     
    728728
    729729    }
    730     log_msg(2, "(mount_cdrom) --- command = %s", mount_cmd);
     730    mr_msg(2, "(mount_cdrom) --- command = %s", mount_cmd);
    731731    for (i = 0; i < 2; i++) {
    732732        res = run_program_and_log_output(mount_cmd, FALSE);
     
    734734            break;
    735735        } else {
    736             log_msg(2, "Failed to mount CD-ROM drive.");
     736            mr_msg(2, "Failed to mount CD-ROM drive.");
    737737            sleep(5);
    738738            run_program_and_log_output("sync", FALSE);
     
    742742
    743743    if (res) {
    744         log_msg(2, "Failed, despite %d attempts", i);
    745     } else {
    746         log_msg(2, "Mounted CD-ROM drive OK");
     744        mr_msg(2, "Failed, despite %d attempts", i);
     745    } else {
     746        mr_msg(2, "Mounted CD-ROM drive OK");
    747747    }
    748748    return (res);
     
    830830                /* Check to see if CD is already mounted before mounting it... */
    831831                if (!is_this_device_mounted("/dev/cdrom")) {
    832                     log_msg(2,
     832                    mr_msg(2,
    833833                            "NB: CDROM device not mounted, mounting...");
    834834                    run_program_and_log_output("mount /dev/cdrom "
     
    897897            mr_asprintf(&tmp, "Backup medium is TAPE --- dev=%s",
    898898                    bkpinfo->media_device);
    899             log_msg(2, tmp);
     899            mr_msg(2, tmp);
    900900            mr_free(tmp);
    901901        } else {
     
    903903            bkpinfo->media_size[0] = 1999 * 1024;   /* 650, probably, but we don't need this var anyway */
    904904            bkpinfo->media_size[1] = 1999 * 1024;   /* 650, probably, but we don't need this var anyway */
    905             log_msg(2, "Backup medium is CD-R[W]");
    906         }
    907     } else {
    908         log_msg(2,
     905            mr_msg(2, "Backup medium is CD-R[W]");
     906        }
     907    } else {
     908        mr_msg(2,
    909909                "Not in Disaster Recovery Mode. No need to derive device name from config file.");
    910910    }
     
    913913    if (strstr(value, "yes")) {
    914914        bkpinfo->use_star = TRUE;
    915         log_msg(1, "Goody! ... bkpinfo->use_star is now true.");
     915        mr_msg(1, "Goody! ... bkpinfo->use_star is now true.");
    916916    }
    917917    mr_free(value);
     
    920920    if (strstr(value, "TRUE")) {
    921921        mr_asprintf(&g_getfacl,"setfacl");
    922         log_msg(1, "We will restore ACLs");
     922        mr_msg(1, "We will restore ACLs");
    923923        if (! find_home_of_exe("setfacl")) {
    924             log_msg(1, "Unable to restore ACLs as no setfacl found");
     924            mr_msg(1, "Unable to restore ACLs as no setfacl found");
    925925        }
    926926    }
     
    928928    if (strstr(value, "TRUE")) {
    929929        mr_asprintf(&g_getfattr,"setfattr");
    930         log_msg(1, "We will restore XATTRs");
     930        mr_msg(1, "We will restore XATTRs");
    931931        if (! find_home_of_exe("setfattr")) {
    932             log_msg(1, "Unable to restore XATTRs as no setfattr found");
     932            mr_msg(1, "Unable to restore XATTRs as no setfattr found");
    933933        }
    934934    }
     
    936936    if (0 == read_cfg_var(cfg_file, "internal-tape-block-size", value)) {
    937937        bkpinfo->internal_tape_block_size = atol(value);
    938         log_msg(1, "Internal tape block size has been custom-set to %ld",
     938        mr_msg(1, "Internal tape block size has been custom-set to %ld",
    939939                bkpinfo->internal_tape_block_size);
    940940    } else {
    941941        bkpinfo->internal_tape_block_size =
    942942            DEFAULT_INTERNAL_TAPE_BLOCK_SIZE;
    943         log_msg(1, "Internal tape block size = default (%ld)",
     943        mr_msg(1, "Internal tape block size = default (%ld)",
    944944                DEFAULT_INTERNAL_TAPE_BLOCK_SIZE);
    945945    }
     
    980980        bkpinfo->differential = TRUE;
    981981    }
    982     log_msg(2, "differential var = '%s'", value);
     982    mr_msg(2, "differential var = '%s'", value);
    983983    mr_free(value);
    984984
    985985    if (bkpinfo->differential) {
    986         log_msg(2, "THIS IS A DIFFERENTIAL BACKUP");
    987     } else {
    988         log_msg(2, "This is a regular (full) backup");
     986        mr_msg(2, "THIS IS A DIFFERENTIAL BACKUP");
     987    } else {
     988        mr_msg(2, "This is a regular (full) backup");
    989989    }
    990990
     
    997997    if ((tmp != NULL) || strstr(tmp1,"donteject")) {
    998998        bkpinfo->please_dont_eject = TRUE;
    999         log_msg(2, "Ok, I shan't eject when restoring! Groovy.");
     999        mr_msg(2, "Ok, I shan't eject when restoring! Groovy.");
    10001000    }
    10011001    mr_free(tmp);
     
    10041004    if (bkpinfo->backup_media_type == nfs) {
    10051005        if (!cfgf) {
    1006             log_msg(2, "nfs_mount remains %s", bkpinfo->nfs_mount);
    1007             log_msg(2, "nfs_remote_dir remains %s",
     1006            mr_msg(2, "nfs_mount remains %s", bkpinfo->nfs_mount);
     1007            mr_msg(2, "nfs_remote_dir remains %s",
    10081008                    bkpinfo->nfs_remote_dir);
    1009             log_msg(2,
     1009            mr_msg(2,
    10101010                    "...cos it wouldn't make sense to abandon the values that GOT ME to this config file in the first place");
    10111011        } else {
     
    10161016            read_cfg_var(g_mondo_cfg_file, "nfs-server-path",
    10171017                         bkpinfo->nfs_remote_dir);
    1018             log_msg(2, "nfs_mount is %s", bkpinfo->nfs_mount);
    1019             log_msg(2, "nfs_remote_dir is %s", bkpinfo->nfs_remote_dir);
     1018            mr_msg(2, "nfs_mount is %s", bkpinfo->nfs_mount);
     1019            mr_msg(2, "nfs_remote_dir is %s", bkpinfo->nfs_remote_dir);
    10201020        }
    10211021        if (strstr(call_program_and_get_last_line_of_output
     
    10601060        mr_free(g_isodir_device);
    10611061        read_cfg_var(g_mondo_cfg_file, "iso-dev", g_isodir_device);
    1062         log_msg(2, "isodir=%s; iso-dev=%s", bkpinfo->isodir, g_isodir_device);
     1062        mr_msg(2, "isodir=%s; iso-dev=%s", bkpinfo->isodir, g_isodir_device);
    10631063        if (bkpinfo->disaster_recovery) {
    10641064            if (is_this_device_mounted(g_isodir_device)) {
    1065                 log_msg(2, "NB: isodir is already mounted");
     1065                mr_msg(2, "NB: isodir is already mounted");
    10661066                /* Find out where it's mounted */
    10671067                mr_asprintf(&command,
     
    10811081                mr_asprintf(&tmp, "mount %s %s", g_isodir_device, iso_mnt);
    10821082                if (run_program_and_log_output(tmp, 3)) {
    1083                     log_msg(1,
     1083                    mr_msg(1,
    10841084                            "Unable to mount isodir. Perhaps this is really a CD backup?");
    10851085                    bkpinfo->backup_media_type = cdr;
     
    10951095                            ("Unable to mount isodir. Failed to mount CD-ROM as well.");
    10961096                    } else {
    1097                         log_msg(1,
     1097                        mr_msg(1,
    10981098                                "You backed up to disk, then burned some CDs.");
    10991099                    }
     
    11141114        if (g_restoring_live_from_cd) {
    11151115            if (bkpinfo->backup_media_type != media_specified_by_user) {
    1116                 log_msg(2,
     1116                mr_msg(2,
    11171117                        "bkpinfo->backup_media_type != media_specified_by_user, so I'd better ask :)");
    11181118                interactively_obtain_media_parameters_from_user(bkpinfo, FALSE);
     
    11631163    if (does_file_exist(g_filelist_full)
    11641164        && does_file_exist(g_biggielist_txt)) {
    1165         log_msg(1, "%s exists", g_filelist_full);
    1166         log_msg(1, "%s exists", g_biggielist_txt);
    1167         log_msg(2,
     1165        mr_msg(1, "%s exists", g_filelist_full);
     1166        mr_msg(1, "%s exists", g_biggielist_txt);
     1167        mr_msg(2,
    11681168                "Filelist and biggielist already recovered from media. Yay!");
    11691169    } else {
    11701170        getcwd(tmp, MAX_STR_LEN);
    11711171        chdir(bkpinfo->tmpdir);
    1172         log_msg(1, "chdir(%s)", bkpinfo->tmpdir);
     1172        mr_msg(1, "chdir(%s)", bkpinfo->tmpdir);
    11731173        log_to_screen("Extracting filelist and biggielist from media...");
    11741174        unlink("/tmp/filelist.full");
     
    11831183                    FILELIST_FULL_STUB,
    11841184                    "tmp/i-want-my-lvm", MONDO_CFG_FILE_STUB);
    1185             log_msg(1, "tarcommand = %s", command);
     1185            mr_msg(1, "tarcommand = %s", command);
    11861186            run_program_and_log_output(command, 1);
    11871187            mr_free(command);
    11881188        } else {
    1189             log_msg(2,
     1189            mr_msg(2,
    11901190                    "Calling insist_on_this_cd_number; bkpinfo->isodir=%s",
    11911191                    bkpinfo->isodir);
    11921192            insist_on_this_cd_number(bkpinfo, 1);
    1193             log_msg(2, "Back from iotcn");
     1193            mr_msg(2, "Back from iotcn");
    11941194            run_program_and_log_output("mount", 1);
    11951195            mr_asprintf(&command,
     
    12011201                    "tmp/i-want-my-lvm", MONDO_CFG_FILE_STUB);
    12021202
    1203             log_msg(1, "tarcommand = %s", command);
     1203            mr_msg(1, "tarcommand = %s", command);
    12041204            run_program_and_log_output(command, 1);
    12051205            mr_free(command);
     
    12211221        mr_asprintf(&command, "cp -f %s/%s %s", bkpinfo->tmpdir,
    12221222                BIGGIELIST_TXT_STUB, g_biggielist_txt);
    1223         log_msg(1, "command = %s", command);
     1223        mr_msg(1, "command = %s", command);
    12241224        paranoid_system(command);
    12251225        mr_free(command);
     
    12271227        mr_asprintf(&command, "ln -sf %s/%s %s", bkpinfo->tmpdir,
    12281228                FILELIST_FULL_STUB, g_filelist_full);
    1229         log_msg(1, "command = %s", command);
     1229        mr_msg(1, "command = %s", command);
    12301230        paranoid_system(command);
    12311231        mr_free(command);
     
    12471247
    12481248    if (!does_file_exist(g_biggielist_txt)) {
    1249         log_msg(1, "Warning - %s not found", g_biggielist_txt);
     1249        mr_msg(1, "Warning - %s not found", g_biggielist_txt);
    12501250    }
    12511251    if (!does_file_exist(g_filelist_full)) {
    1252         log_msg(1, "Warning - %s does not exist", g_filelist_full);
     1252        mr_msg(1, "Warning - %s does not exist", g_filelist_full);
    12531253    }
    12541254//  popup_and_OK("Wonderful.");
    12551255
    1256     log_msg(2, "Forking");
     1256    mr_msg(2, "Forking");
    12571257    pid = fork();
    12581258    switch (pid) {
     
    12841284    close_evalcall_form();
    12851285
    1286     log_msg(3, "loading filelist");
     1286    mr_msg(3, "loading filelist");
    12871287    filelist = load_filelist(g_filelist_full);
    1288     log_msg(3, "deleting original filelist");
     1288    mr_msg(3, "deleting original filelist");
    12891289    unlink(g_filelist_full);
    12901290    if (g_text_mode) {
     
    13021302    }
    13031303    if (res) {
    1304         log_msg(2, "User hit 'cancel'. Freeing filelist and aborting.");
     1304        mr_msg(2, "User hit 'cancel'. Freeing filelist and aborting.");
    13051305        free_filelist(filelist);
    13061306        return (NULL);
     
    13701370    read_cfg_var(g_mondo_cfg_file, "bootloader.name", name);
    13711371    mr_asprintf(&tmp, "run_boot_loader: device='%s', name='%s'", device, name);
    1372     log_msg(2, tmp);
     1372    mr_msg(2, tmp);
    13731373    mr_free(tmp);
    13741374
     
    13861386//      else
    13871387//        {
    1388 //    log_msg(1, "Not running run_grub(). Was a bad idea anyway.");
     1388//    mr_msg(1, "Not running run_grub(). Was a bad idea anyway.");
    13891389//    res = 1;
    13901390//  }
     
    14041404            res = run_program_and_log_output(tmp, 3);
    14051405        } else {
    1406             log_msg(1,
     1406            mr_msg(1,
    14071407                    "I'm not running any boot loader. You have a DD boot drive. It's already loaded up.");
    14081408        }
     
    14641464    tmp = find_home_of_exe(output);
    14651465    if (!tmp) {
    1466         log_msg(2, " (find_my_editor) --- warning - %s not found", output);
     1466        mr_msg(2, " (find_my_editor) --- warning - %s not found", output);
    14671467    }
    14681468    mr_free(tmp);
     
    15361536        /* nuke mode */
    15371537        if (!run_program_and_log_output("which grub-MR", FALSE)) {
    1538             log_msg(1, "Yay! grub-MR found...");
     1538            mr_msg(1, "Yay! grub-MR found...");
    15391539            mr_asprintf(&command, "grub-MR %s /tmp/mountlist.txt", bd);
    1540             log_msg(1, "command = %s", command);
     1540            mr_msg(1, "command = %s", command);
    15411541        } else {
    15421542            mr_asprintf(&command, "chroot " MNT_RESTORING " grub-install %s", bd);
    1543             log_msg(1, "WARNING - grub-MR not found; using grub-install");
     1543            mr_msg(1, "WARNING - grub-MR not found; using grub-install");
    15441544        }
    15451545        mvaddstr_and_log_it(g_currentY,
     
    15661566            (_
    15671567             ("GRUB ran w/error(s). See /tmp/mondo-restore.log for more info."));
    1568         log_msg(1, "Type:-");
    1569         log_msg(1, "    mount-me");
    1570         log_msg(1, "    chroot " MNT_RESTORING);
    1571         log_msg(1, "    mount /boot");
    1572         log_msg(1, "    grub-install '(hd0)'");
    1573         log_msg(1, "    exit");
    1574         log_msg(1, "    unmount-me");
    1575         log_msg(1,
     1568        mr_msg(1, "Type:-");
     1569        mr_msg(1, "    mount-me");
     1570        mr_msg(1, "    chroot " MNT_RESTORING);
     1571        mr_msg(1, "    mount /boot");
     1572        mr_msg(1, "    grub-install '(hd0)'");
     1573        mr_msg(1, "    exit");
     1574        mr_msg(1, "    unmount-me");
     1575        mr_msg(1,
    15761576                "If you're really stuck, please e-mail the mailing list.");
    15771577    } else {
     
    18291829                            ("Restoring MBR...                                               "));
    18301830        mr_asprintf(&command, "raw-MR %s /tmp/mountlist.txt", bd);
    1831         log_msg(2, "run_raw_mbr() --- command='%s'", command);
     1831        mr_msg(2, "run_raw_mbr() --- command='%s'", command);
    18321832        res = run_program_and_log_output(command, 3);
    18331833        mr_free(command);
     
    19991999void termination_in_progress(int sig)
    20002000{
    2001     log_msg(1, "Termination in progress");
     2001    mr_msg(1, "Termination in progress");
    20022002    usleep(1000);
    20032003    pthread_exit(0);
     
    20472047         i++) {
    20482048        sleep(1);
    2049         log_msg(2, "Waiting for buffer() to finish");
     2049        mr_msg(2, "Waiting for buffer() to finish");
    20502050    }
    20512051
     
    20542054    if (run_program_and_log_output
    20552055        ("cp -f /tmp/mondo-restore.log " MNT_RESTORING "/tmp/", FALSE)) {
    2056         log_msg(1,
     2056        mr_msg(1,
    20572057                "Error. Failed to copy log to PC's /tmp dir. (Mounted read-only?)");
    20582058    }
    20592059    if (run_program_and_log_output
    20602060        ("cp -f /tmp/mondo-restore.log " MNT_RESTORING "/root/", FALSE)) {
    2061         log_msg(1,
     2061        mr_msg(1,
    20622062                "Error. Failed to copy log to PC's /root dir. (Mounted read-only?)");
    20632063    }
     
    20812081                if (!strcmp(mountlist->el[lino].mountpoint, "/1")) {
    20822082                    mr_asprintf(&command, "umount %s/", MNT_RESTORING);
    2083                     log_msg(3,
     2083                    mr_msg(3,
    20842084                            "Well, I know a certain kitty-kitty who'll be sleeping with Mommy tonight...");
    20852085                } else {
     
    20882088                }
    20892089            }
    2090             log_msg(10, "The 'umount' command is '%s'", command);
     2090            mr_msg(10, "The 'umount' command is '%s'", command);
    20912091            res = run_program_and_log_output(command, 3);
    20922092            mr_free(command);
     
    21052105            log_to_screen(tmp);
    21062106        } else {
    2107             log_msg(2, tmp);
     2107            mr_msg(2, tmp);
    21082108        }
    21092109        mr_free(tmp);
     
    21492149            MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB,
    21502150            BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, "tmp/i-want-my-lvm");
    2151     log_msg(2, "command = '%s'", command);
     2151    mr_msg(2, "command = '%s'", command);
    21522152    res = run_program_and_log_output(command, -1);
    21532153    mr_free(command);
     
    21852185
    21862186    assert(bkpinfo != NULL);
    2187     log_msg(2, "gcffa --- starting");
     2187    mr_msg(2, "gcffa --- starting");
    21882188    log_to_screen(_("I'm thinking..."));
    21892189    mr_asprintf(&mountpt, "%s/mount.bootdisk", bkpinfo->tmpdir);
     
    22022202    mr_asprintf(&mountlist_file, "%s/%s", bkpinfo->tmpdir,
    22032203            MOUNTLIST_FNAME_STUB);
    2204     log_msg(2, "mountpt = %s; cfg_file=%s", mountpt, cfg_file);
     2204    mr_msg(2, "mountpt = %s; cfg_file=%s", mountpt, cfg_file);
    22052205
    22062206    /* Floppy? */
     
    22172217            "(sleep 15; kill `ps | grep \"%s\" | cut -d' ' -f1` 2> /dev/null) &",
    22182218            command);
    2219     log_msg(1, "tmp = '%s'", tmp);
     2219    mr_msg(1, "tmp = '%s'", tmp);
    22202220    system(tmp);
    22212221    mr_free(tmp);
     
    22332233    } else {
    22342234        try_plan_B = TRUE;
    2235         log_msg(2,
     2235        mr_msg(2,
    22362236                "Mounted floppy OK but I don't trust it because the archives might contain more up-to-date config file than the floppy does.");
    22372237// NB: If busybox does not support 'mount -o loop' then Plan A WILL NOT WORK.
    2238         log_msg(2, "Processing floppy (plan A?)");
     2238        mr_msg(2, "Processing floppy (plan A?)");
    22392239        mr_asprintf(&ramdisk_fname, "%s/mindi.rdz", mountpt);
    22402240        if (!does_file_exist(ramdisk_fname)) {
     
    22432243        }
    22442244        if (!does_file_exist(ramdisk_fname)) {
    2245             log_msg(2,
     2245            mr_msg(2,
    22462246                    "Cannot find ramdisk file on mountpoint. Are you sure that's a boot disk in the drive?");
    22472247        }
    22482248        if (extract_config_file_from_ramdisk
    22492249            (bkpinfo, ramdisk_fname, cfg_file, mountlist_file)) {
    2250             log_msg(2,
     2250            mr_msg(2,
    22512251                    "Warning - failed to extract config file from ramdisk. I think this boot disk is mangled.");
    22522252        }
     
    22592259    }
    22602260    if (!does_file_exist(cfg_file)) {
    2261         log_msg(2, "gcffa --- we don't have cfg file yet.");
     2261        mr_msg(2, "gcffa --- we don't have cfg file yet.");
    22622262        if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    22632263            try_plan_B = TRUE;
    22642264        } else {
    2265             log_msg(2, "gcffa --- calling mount_cdrom now :)");
     2265            mr_msg(2, "gcffa --- calling mount_cdrom now :)");
    22662266            if (!mount_cdrom(bkpinfo)) {
    2267                 log_msg(2,
     2267                mr_msg(2,
    22682268                        "gcffa --- managed to mount CD; so, no need for Plan B");
    22692269                try_plan_B = FALSE;
     
    22772277        }
    22782278        if (try_plan_B) {
    2279             log_msg(2, "gcffa --- OK, switching to Plan B");
     2279            mr_msg(2, "gcffa --- OK, switching to Plan B");
    22802280            chdir(bkpinfo->tmpdir);
    22812281            run_program_and_log_output("mkdir -p tmp", FALSE);
     
    22832283            if (bkpinfo->media_device == NULL) {
    22842284                mr_asprintf(&bkpinfo->media_device, "/dev/st0");
    2285                 log_msg(2, "media_device is blank; assuming %s",
     2285                mr_msg(2, "media_device is blank; assuming %s",
    22862286                        bkpinfo->media_device);
    22872287            }
     
    22982298                        if (extract_cfg_file_and_mountlist_from_tape_dev
    22992299                            (bkpinfo->media_device)) {
    2300                             log_msg(3,
     2300                            mr_msg(3,
    23012301                                    "I tried lots of devices but none worked.");
    23022302                            mr_allocstr(bkpinfo->media_device, sav);
     
    23132313            }
    23142314        } else {
    2315             log_msg(2,
     2315            mr_msg(2,
    23162316                    "gcffa --- looking at mounted CD for mindi-boot.2880.img");
    23172317            /* BERLIOS : Useless ?
     
    23222322            mr_asprintf(&mounted_cfgf_path, "%s/%s", mountpt, cfg_file);
    23232323            if (!does_file_exist(mounted_cfgf_path)) {
    2324                 log_msg(2,
     2324                mr_msg(2,
    23252325                        "gcffa --- Plan C, a.k.a. untarring some file from all.tar.gz");
    23262326                mr_asprintf(&command, "tar -zxvf " MNT_CDROM "/images/all.tar.gz %s %s %s %s %s", MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB, BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, "tmp/i-want-my-lvm"); // add -b TAPE_BLOCK_SIZE if you _really_ think it's necessary
     
    23392339
    23402340    if (does_file_exist(MONDO_CFG_FILE_STUB)) {
    2341         log_msg(1, "gcffa --- great! We've got the config file");
     2341        mr_msg(1, "gcffa --- great! We've got the config file");
    23422342        tmp1 = call_program_and_get_last_line_of_output("pwd");
    23432343        mr_asprintf(&tmp, "%s/%s", tmp1,MONDO_CFG_FILE_STUB);
     
    23472347        if (strcmp(tmp, cfg_file)
    23482348            && run_program_and_log_output(command, 1)) {
    2349             log_msg(1,
     2349            mr_msg(1,
    23502350                    "... but an error occurred when I tried to move it to %s",
    23512351                    cfg_file);
    23522352        } else {
    2353             log_msg(1, "... and I moved it successfully to %s", cfg_file);
     2353            mr_msg(1, "... and I moved it successfully to %s", cfg_file);
    23542354        }
    23552355        mr_free(command);
     
    23622362        if (strcmp(tmp, cfg_file)
    23632363            && run_program_and_log_output(command, 1)) {
    2364             log_msg(1, "Failed to get mountlist");
     2364            mr_msg(1, "Failed to get mountlist");
    23652365        } else {
    2366             log_msg(1, "Got mountlist too");
     2366            mr_msg(1, "Got mountlist too");
    23672367            mr_free(command);
    23682368            mr_asprintf(&command, "cp -f %s %s", mountlist_file,
    23692369                    g_mountlist_fname);
    23702370            if (run_program_and_log_output(command, 1)) {
    2371                 log_msg(1, "Failed to copy mountlist to /tmp");
     2371                mr_msg(1, "Failed to copy mountlist to /tmp");
    23722372            } else {
    2373                 log_msg(1, "Copied mountlist to /tmp as well OK");
     2373                mr_msg(1, "Copied mountlist to /tmp as well OK");
    23742374                mr_free(command);
    23752375                mr_asprintf(&command, "cp -f tmp/i-want-my-lvm /tmp/");
     
    23832383    if (!does_file_exist(cfg_file)) {
    23842384        iamhere(cfg_file);
    2385         log_msg(1, "%s not found", cfg_file);
     2385        mr_msg(1, "%s not found", cfg_file);
    23862386        log_to_screen
    23872387            (_
     
    24482448        if (parse_mdstat(raidlist, "/dev/")) {
    24492449            log_to_screen("Sorry, cannot read %s", MDSTAT_FILE);
    2450             log_msg(1, "Sorry, cannot read %s", MDSTAT_FILE);
     2450            mr_msg(1, "Sorry, cannot read %s", MDSTAT_FILE);
    24512451            return;
    24522452        }
     
    24552455            if (raidlist->el[i].progress < wait_for_percentage) {
    24562456                unfinished_mdstat_devices++;
    2457                 log_msg(1, "Sync'ing %s (i=%d)",
     2457                mr_msg(1, "Sync'ing %s (i=%d)",
    24582458                        raidlist->el[i].raid_device, i);
    24592459                mr_asprintf(&screen_message, "Sync'ing %s",
     
    24662466                }
    24672467                while (raidlist->el[i].progress < wait_for_percentage) {
    2468                     log_msg(1, "Percentage sync'ed: %d",
     2468                    mr_msg(1, "Percentage sync'ed: %d",
    24692469                            raidlist->el[i].progress);
    24702470                    update_evalcall_form(raidlist->el[i].progress);
Note: See TracChangeset for help on using the changeset viewer.