Changeset 524


Ignore:
Timestamp:
May 5, 2006, 11:47:41 AM (13 years ago)
Author:
bcornec
Message:

merge -r 516:523 $SVN_M/branches/stable

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/mindi/mindi

    r518 r524  
    13901390    [ "$c_p" = "none" ] && continue
    13911391    absolute_partition=`ResolveSoftlink $c_p`
    1392     partition_mountpt=`tr -s '\t' ' ' < $MY_FSTAB | grep -w "$current_partition" | grep -vx " *#.*" | $AWK '{print $2}' | head -n1`
     1392    partition_mountpt=`tr -s '\t' ' ' < $MY_FSTAB | /bin/grep -w "$current_partition" | /bin/grep -vx " *#.*" | $AWK '{print $2}' | head -n1`
    13931393
    13941394    # This part tries to retrieve the correct device from a LABEL line in /etc/fstab
    13951395    # current_partition contains only first column of /etc/fstab
    1396     redhat_label=""
    13971396    if [ "`echo "$current_partition" | /bin/grep -f -i "LABEL="`" != "" ] ; then
    13981397        str_to_find_fmt_with=$current_partition
     
    14021401        # 1st try : blkid, the good way
    14031402        if [ -x "/sbin/blkid" ] ; then
    1404             actual_dev=`/sbin/blkid | grep "$current_partition" | /bin/cut -d':' -f1`
    1405         fi
     1403            actual_dev=`/sbin/blkid | /bin/grep "$current_partition" | /bin/cut -d':' -f1`
     1404        fi
     1405
    14061406        # 2nd try, which works on a standard partition (ext2/3), but not on swap
    1407         if [ $actual_dev="" ] ; then
     1407        if [ -n $actual_dev ] ; then
    14081408            actual_dev=`/bin/mount -l | /bin/grep " [$redhat_label]" | /bin/cut -d' ' -f1`
    14091409        fi
     1410
    14101411        # 3rd try, with vol_id (which works with swap)
    1411         if [ $actual_dev="" -a -x "/sbin/vol_id" ] ; then
     1412        if [ -n $actual_dev -a -x "/sbin/vol_id" ] ; then
    14121413                list_swaps=`cat /proc/swaps | /bin/grep "/dev/" | /bin/awk '{ print $1 }' `
    14131414                for dev_swap in $list_swaps ; do
    1414                     dev_exists=`/sbin/vol_id $dev_swap | /bin/grep -f "$redhat_label"`
     1415                    dev_exists=`/sbin/vol_id $dev_swap | /bin/grep "$redhat_label"`
    14151416                    if [ -n "$dev_exists" ] ; then
    14161417                        actual_dev=$dev_swap
     
    14191420                done
    14201421        fi
     1422
    14211423        # 4th try : pre-formated LABEL. Format is : LABEL=SWAP-mydevice. e.g. : LABEL=SWAP-hda5
    1422         if [ $actual_dev="" -a  "`echo "$current_partition" | /bin/grep -f -i "LABEL=SWAP"`" != ""] ; then
    1423                 actual_dev="/dev/`echo "$redhat_label" | /bin/cut -d '-' -f2`"
    1424         fi
     1424        if [ -n $actual_dev -a  "`echo "$current_partition" | /bin/grep -i "LABEL=SWAP"`" != ""] ; then
     1425                try_dev="`echo "$redhat_label" | /bin/cut -d '-' -f2`"
     1426                present_dev="`/bin/cat /proc/swaps | /bin/grep -w /dev/$try_dev`"
     1427                if [ -n "$present_dev" ] ; then
     1428                    actual_dev="/dev/$try_dev"
     1429                fi
     1430        fi
     1431
    14251432        # Check if one of all those tries has known success
    1426         if [  $actual_dev != "" ] ; then
     1433        if [ ! -n $actual_dev ] ; then
    14271434                current_partition=$actual_dev
    14281435        else
    1429             Die "Your system uses a labelled swap partition, but you lack the tool to su
    1430 pport it.\nPlease replace swap labels with their correct devices in /etc/fstab\n"
     1436            Die "Your system uses a labelled swap partition, but you lack the tool to support it.\nPlease replace swap labels with their correct devices in /etc/fstab\n"
    14311437        fi
    14321438    else
  • trunk/mondo/mondo/mondoarchive/mondo-cli.c

    r507 r524  
    327327        strncpy(bkpinfo->include_paths + strlen(bkpinfo->include_paths),
    328328                flag_val['I'],
    329                 MAX_STR_LEN - strlen(bkpinfo->include_paths));
     329                4*MAX_STR_LEN - strlen(bkpinfo->include_paths));
    330330        log_msg(1, "include_paths is now '%s'", bkpinfo->include_paths);
    331331        if (bkpinfo->include_paths[0] == '-') {
     
    561561        strncpy(bkpinfo->exclude_paths + strlen(bkpinfo->exclude_paths),
    562562                flag_val['E'],
    563                 MAX_STR_LEN - strlen(bkpinfo->exclude_paths));
     563                4*MAX_STR_LEN - strlen(bkpinfo->exclude_paths));
    564564    }
    565565    if (flag_set['e']) {
  • trunk/mondo/mondo/mondorestore/mondo-rstr-compare.c

    r507 r524  
    254254    }
    255255    mvaddstr_and_log_it(g_currentY, 0,
    256                         "Comparing large files                                                  ");
     256                        _("Comparing large files                                                  "));
    257257    open_progress_form(_("Comparing large files"),
    258258                       _("I am now comparing the large files"),
     
    270270    return (0);
    271271    if (retval) {
    272         mvaddstr_and_log_it(g_currentY++, 74, "Errors.");
    273     } else {
    274         mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     272        mvaddstr_and_log_it(g_currentY++, 74, _("Errors."));
     273    } else {
     274        mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
    275275    }
    276276    return (retval);
     
    430430
    431431    assert(bkpinfo != NULL);
    432     mvaddstr_and_log_it(g_currentY, 0, "Comparing archives");
     432    mvaddstr_and_log_it(g_currentY, 0, _("Comparing archives"));
    433433    read_cfg_var(g_mondo_cfg_file, "last-filelist-number", tmp);
    434434
     
    490490    close_progress_form();
    491491    if (retval) {
    492         mvaddstr_and_log_it(g_currentY++, 74, "Errors.");
    493     } else {
    494         mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     492        mvaddstr_and_log_it(g_currentY++, 74, _("Errors."));
     493    } else {
     494        mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
    495495    }
    496496    paranoid_free(tarball_fname);
     
    609609    read_cfg_file_into_bkpinfo(g_mondo_cfg_file, bkpinfo);
    610610    g_current_media_number = 1;
    611     mvaddstr_and_log_it(1, 30, "Comparing Automatically");
     611    mvaddstr_and_log_it(1, 30, _("Comparing Automatically"));
    612612    iamhere("Pre-MAD");
    613613    retval = mount_all_devices(mountlist, FALSE);
     
    628628        mvaddstr_and_log_it(g_currentY++,
    629629                            0,
    630                             "Warning - differences found during the compare phase");
     630                            _("Warning - differences found during the compare phase"));
    631631    }
    632632
     
    635635    if (count_lines_in_file("/tmp/changed.txt") > 0) {
    636636        mvaddstr_and_log_it(g_currentY++, 0,
    637                             "Differences found while files were being compared.");
     637                            _("Differences found while files were being compared."));
    638638        streamline_changes_file("/tmp/changed.files", "/tmp/changed.txt");
    639639        if (count_lines_in_file("/tmp/changed.files") <= 0) {
    640640            mvaddstr_and_log_it(g_currentY++, 0,
    641                                 "...but they were logfiles and temporary files. Your archives are fine.");
     641                                _("...but they were logfiles and temporary files. Your archives are fine."));
    642642            log_to_screen
    643643                (_("The differences were logfiles and temporary files. Your archives are fine."));
     
    696696    run_program_and_log_output(command, FALSE);
    697697    mvaddstr_and_log_it(g_currentY,
    698                         0, "Verifying archives against filesystem");
     698                        0, _("Verifying archives against filesystem"));
    699699
    700700    if (bkpinfo->disaster_recovery
     
    719719    }
    720720
    721     mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     721    mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
    722722    paranoid_free(dir);
    723723    paranoid_free(command);
     
    756756    run_program_and_log_output(command, FALSE);
    757757    mvaddstr_and_log_it(g_currentY,
    758                         0, "Verifying archives against filesystem");
     758                        0, _("Verifying archives against filesystem"));
    759759    res = verify_tape_backups(bkpinfo);
    760760    chdir(dir);
    761761    if (res) {
    762         mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
    763     } else {
    764         mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     762        mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
     763    } else {
     764        mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
    765765    }
    766766    paranoid_free(dir);
Note: See TracChangeset for help on using the changeset viewer.