Changeset 3686 in MondoRescue for branches/3.3


Ignore:
Timestamp:
Sep 22, 2017, 2:22:48 AM (7 years ago)
Author:
Bruno Cornec
Message:

Fix wrong spaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/mondo/src/restore-scripts/mondo/mr-make-me-bootable

    r3542 r3686  
    66
    77if [ "$#" -ne "2" ] && [ "$#" -ne "3" ] ; then
    8     echo "mr-make-me-bootable <fname> <drive> [noaction]"
    9     exit 1
     8    echo "mr-make-me-bootable <fname> <drive> [noaction]"
     9    exit 1
    1010fi
    1111
     
    2424for i in `cat $1 | tr -s '\t' ' ' | cut -d' ' -f1 | grep -vE "/dev/fd|none|#"` ; do
    2525    # Warning wrong if LVM !
    26     drive=`echo $i | sed -e 's/[0-9]*$//' -e 's/\([0-9]\)p$/\1/'`
     26    drive=`echo $i | sed -e 's/[0-9]*$//' -e 's/\([0-9]\)p$/\1/'`
    2727    if [ "$drivetouse" = "$drive" ]; then
    2828        # We can continue as this is the drive we ned to work on
    29         partno=`echo $i | sed -e 's/^.*[^0-9]\([0-9]*\)$/\1/'`
    30         mountpt=`grep "$i " $1 | tr -s '\t' ' ' | cut -d' ' -f2`
     29        partno=`echo $i | sed -e 's/^.*[^0-9]\([0-9]*\)$/\1/'`
     30        mountpt=`grep "$i " $1 | tr -s '\t' ' ' | cut -d' ' -f2`
    3131
    32         if [ "$mountpt" = "/" ] ; then
    33             root_drv=$drive
    34             root_part=$partno
    35         elif [ "$mountpt" = "/boot" ] ; then
    36             boot_drv=$drive
    37             boot_part=$partno
    38         fi
    39     fi
     32        if [ "$mountpt" = "/" ] ; then
     33            root_drv=$drive
     34            root_part=$partno
     35        elif [ "$mountpt" = "/boot" ] ; then
     36            boot_drv=$drive
     37            boot_part=$partno
     38        fi
     39    fi
    4040done
    4141
    4242if [ "$boot_drv" ] ; then
    43     drive=$boot_drv
    44     partno=$boot_part
     43    drive=$boot_drv
     44    partno=$boot_part
    4545elif [ "$root_drv" ] ; then
    46     drive=$root_drv
    47     partno=$root_part
     46    drive=$root_drv
     47    partno=$root_part
    4848else
    49     driveline=`grep -E '[   ]/boot[     ]' $1`
    50     [ ! "$driveline" ] && driveline=`grep -E '[     ]/[     ]' $1`
    51     partno=`echo "$driveline" | cut -d' ' -f1 | awk -F "[a-z]" '{print $NF;}'`
     49    driveline=`grep -E '[   ]/boot[     ]' $1`
     50    [ ! "$driveline" ] && driveline=`grep -E '[     ]/[     ]' $1`
     51    partno=`echo "$driveline" | cut -d' ' -f1 | awk -F "[a-z]" '{print $NF;}'`
    5252#    echo "driveline=$driveline --> partno=$partno"
    5353fi
    5454
    5555if [ "$drive" ] ; then
    56     if [ "$partno" = "0" ] || [ ! "$partno" ] ; then
    57         partno="1"
     56    if [ "$partno" = "0" ] || [ ! "$partno" ] ; then
     57        partno="1"
    5858    fi
    5959    cmd=""
     
    6161        # First desactivate active partitions (coming from previous usage)
    6262        cmd="${cmd}a\n$p\n"
    63         if [ "$dummy" != "" ] ; then
     63        if [ "$dummy" != "" ] ; then
    6464            echo "Will desactivate $p on $drive" >> $LOGFILE
    6565        fi
    6666    done
    6767    # Then activate the one which should
    68     if [ "$dummy" != "" ] ; then
     68    if [ "$dummy" != "" ] ; then
    6969        echo "Would activate $partno on $drive" >> $LOGFILE
    7070    else
Note: See TracChangeset for help on using the changeset viewer.