Ignore:
Timestamp:
Jun 19, 2013, 8:34:46 AM (11 years ago)
Author:
Bruno Cornec
Message:
  • First pass on svn merge -r 2935:3146 ../3.0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/mondo/src/restore-scripts/mondo/label-partitions-as-necessary

    r2462 r3147  
    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
     
    3842            if [ "$opttun" = "-U" ]; then
    3943                LogIt "Creating uuid $label on swap partition $mountpt"
    40                 echo -n "$label" | perl -ne 's/-//g;chomp;print pack "H*",$_' | dd conv=notrunc "of=$mountpt" obs=1 seek=1036
     44                if [ -x "/sbin/swaplabel" ]; then
     45                    /sbin/swaplabel $opttun $label $mountpt
     46                else
     47                    echo -n "$label" | perl -ne 's/-//g;chomp;print pack "H*",$_' | dd conv=notrunc "of=$mountpt" obs=1 seek=1036
     48                fi
    4149            else
    42                 command="mkswap $opttun $label $mountpt"
     50                if [ -x "/sbin/swaplabel" ]; then
     51                    command="/sbin/swaplabel $opttun $label $mountpt"
     52                else
     53                    command="mkswap $opttun $label $mountpt"
     54                fi
    4355                LogIt "Running $command"
    4456                $command
    4557            fi
    4658        else
    47             LogIt "I am NOT going to run tune2fs/reiserfstune: the partition is format '$format', which doesn't like tune2fs/reiserfstune anyway"
     59            LogIt "I am NOT going to run tune2|4fs/reiserfstune: the partition is format '$format', which doesn't like tune2|4fs/reiserfstune anyway"
    4860        fi
    4961    fi
     
    5365# ---------------------------------------------
    5466
    55 LogIt "Identifying your drives with tune2fs"
     67LogIt "Identifying your drives with FS tune tool"
    5668if [ "$#" -ne "1" ] ; then
    5769    LogIt "label-partitions-as-necessary $MINDI_CACHE/mountlist.txt < /tmp/fstab.new" 1
Note: See TracChangeset for help on using the changeset viewer.