Changeset 3008 in MondoRescue for branches/3.0/mondo/src


Ignore:
Timestamp:
May 15, 2012, 6:13:10 PM (12 years ago)
Author:
Bruno Cornec
Message:
  • Fix #618 by adding support for new command tune4fs for labelling ext4 FS (needed on RHEL 5.6 at least)
Location:
branches/3.0/mondo/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/src/mondorestore/mondorestore.c

    r3002 r3008  
    653653        ("Label/Identify your ext2/ext3/ext4 partitions if necessary?")) {
    654654        mvaddstr_and_log_it(g_currentY, 0,
    655                             "Using tune2fs to identify your ext2,3,4 partitions");
     655                            "Using tune2fs/tune4fs to identify your ext2,3,4 partitions");
    656656        if (does_file_exist("/tmp/fstab.new")) {
    657657            strcpy(fstab_fname, "/tmp/fstab.new");
     
    888888    mvaddstr_and_log_it(g_currentY,
    889889                        0,
    890                         "Using tune2fs to identify your ext2,3 partitions");
     890                        "Using tune2fs/tune4fs to identify your ext2,3 partitions");
    891891
    892892    sprintf(tmp, "label-partitions-as-necessary %s < /tmp/fstab >> %s 2>> %s", g_mountlist_fname, MONDO_LOGFILE, MONDO_LOGFILE);
  • branches/3.0/mondo/src/restore-scripts/mondo/label-partitions-as-necessary

    r2172 r3008  
    2828    else
    2929        if [ "$format" = "ext2" ] || [ "$format" = "ext3" ] || [ "$format" = "ext4" ]; then
    30             command="tune2fs $opttun $label $mountpt"
     30            if [ "$format" = "ext4" ] && [ -x "/sbin/tune4fs" ]; then
     31                command="/sbin/tune4fs $opttun $label $mountpt"
     32            else
     33                command="tune2fs $opttun $label $mountpt"
     34            fi
    3135            LogIt "Running $command"
    3236            $command
     
    4549            fi
    4650        else
    47             LogIt "I am NOT going to run tune2fs/reiserfstune: the partition is format '$format', which doesn't like tune2fs/reiserfstune anyway"
     51            LogIt "I am NOT going to run tune2|4fs/reiserfstune: the partition is format '$format', which doesn't like tune2|4fs/reiserfstune anyway"
    4852        fi
    4953    fi
     
    5357# ---------------------------------------------
    5458
    55 LogIt "Identifying your drives with tune2fs"
     59LogIt "Identifying your drives with FS tune tool"
    5660if [ "$#" -ne "1" ] ; then
    5761    LogIt "label-partitions-as-necessary /tmp/mountlist.txt < /tmp/fstab.new" 1
Note: See TracChangeset for help on using the changeset viewer.