Changeset 274 in MondoRescue for trunk/mondo/mondo/restore-scripts/mondo


Ignore:
Timestamp:
Jan 3, 2006, 4:15:54 PM (18 years ago)
Author:
bcornec
Message:

merge -r272:273 $SVN_M/branches/2.06

Location:
trunk/mondo/mondo/restore-scripts/mondo
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/mondo/restore-scripts/mondo/compare-me

    r30 r274  
    104104    padded_bfnum=`printf "%07d" $bf_num`
    105105    slice_fname=`GiveSliceName $bf_num $slice_num`
    106     checksum=`cat $slice_fname | cut -f1`
    107 #    finalsize=`cat $slice_fname | cut -f2`
    108     i=`cat $slice_fname | cut -f3`
     106    checksum=`cut -f1 $slice_fname`
     107#    finalsize=`cut -f2 $slice_fname`
     108    i=`cut -f3 $slice_fname`
    109109    outputfile=/mnt/RESTORING/"$i"
    110110    echo -n "$i "
     
    164164        outcome=$?
    165165            retval=$(($retval+$outcome))
    166         cat /tmp/rsm.log | grep -v "ignored" > /tmp/rsm.2.log
     166        grep -v ignored /tmp/rsm.log > /tmp/rsm.2.log
    167167        if [ "$outcome" -ne "0" ] ; then
    168168        echo -e -n "                                                                            \r"
     
    261261fi
    262262
    263 cat /tmp/compare-me.log \
    264 | grep -v -x "Files [^:]*:-" \
     263grep -v -x "Files [^:]*:-" /tmp/compare-me.log \
    265264| sort | uniq > /tmp/suspect.files
    266265
  • trunk/mondo/mondo/restore-scripts/mondo/grub-MR

    r197 r274  
    6464    BOOTPATHNAME=""
    6565    for sz in /boot / ; do
    66     bootpart=`cat $2 | grep " $sz " | cut -d' ' -f1 | head -n1`
     66    bootpart=`grep " $sz " $2 | cut -d' ' -f1 | head -n1`
    6767    [ "$bootpart" ] && [ -e "/mnt/RESTORING/$bootpart" ] && break
    6868    done
     
    164164if echo $bootpart | grep "/md" > /dev/null ; then
    165165    base=`basename $bootpart`
    166     line=`cat /proc/mdstat | grep $base | head -n1`
     166    line=`grep $base /proc/mdstat | head -n1`
    167167    echo "mbrpart was $mbrpart"
    168168    mbrpart=`parted2fdisk -l | grep /dev/ | head -n1 | tr ':' ' ' \
  • trunk/mondo/mondo/restore-scripts/mondo/hack-fstab

    r30 r274  
    3030    size=`echo "$incoming"       | cut -d' ' -f4`
    3131#    echo "'$device' '$mountpoint' '$format' '$size'" > /dev/stderr
    32     original_fstab_line=`cat $old_fstab | grep " $mountpoint " | grep -v "#" | tr -s ' ' ' '`
     32    original_fstab_line=`grep " $mountpoint " $old_fstab | grep -v "#" | tr -s ' ' ' '`
    3333#    echo "original_fstab_line = $original_fstab_line" >> /dev/stderr
    34     if [ "`cat $old_fstab | grep "LABEL="`" != "" ] ; then
     34    if [ "`grep "LABEL=" $old_fstab`" != "" ] ; then
    3535    if [ "$format" = "ext2" ] || [ "$format" = "ext3" ] ; then
    3636        device="LABEL=$mountpoint"
     
    8989    col2=`echo "$incoming" | cut -f2`
    9090    col_rest=`echo "$incoming" | cut -f3-19 | tr -s ' ' ' '`
    91     orig="`cat $old_fstab | grep " $col2 " | cut -f1`"
     91    orig="`grep " $col2 " $old_fstab | cut -f1`"
    9292    if [ "`echo "$orig" | grep "LABEL="`" != "" ] ; then
    9393    echo "orig = $orig" >> /dev/stderr
  • trunk/mondo/mondo/restore-scripts/mondo/hack-lilo

    r30 r274  
    5454    newdev=`GetNewFstabMountpoint $dev`
    5555    if [ ! "$newdev" ] ; then
    56     col2=`cat $old_mountlist | grep "$dev " | cut -d' ' -f2`
    57     col1_new=`cat $new_mountlist | grep " $col2 " | cut -d' ' -f1`
     56    col2=`grep "$dev " $old_mountlist | cut -d' ' -f2`
     57    col1_new=`grep " $col2 " $new_mountlist | cut -d' ' -f1`
    5858    newdev="$col1_new"
    5959    if [ ! "$newdev" ] ; then
     
    6161    fi
    6262    fi
    63 #    old_fstab_line=`cat $new_fstab | grep "$dev"`
     63#    old_fstab_line=`grep "$dev" $new_fstab`
    6464    [ "$2" = "other" ] || echo -e -n "\t"
    6565    echo -e "$2=$newdev"
     
    135135ProcessLilo < $old_lilo >> $outfile
    136136chmod 600 $outfile
    137 cat $bootlistfile | sort | uniq > $bootlistfile
     137sort -u $bootlistfile -o $bootlistfile
    138138
    139139#------ disabled 12/10/01 (doesn't do anything anyway *g*)
  • trunk/mondo/mondo/restore-scripts/mondo/label-partitions-as-necessary

    r30 r274  
    2828    mountline=`mount | grep " $label "`
    2929#   mountpt=`echo "$mountline" | cut -d' ' -f1`
    30 !   mountpt=`cat $mountlist | grep " $label " | cut -d' ' -f1`
     30!   mountpt=`grep " $label " $mountlist | cut -d' ' -f1`
    3131        if [ ! "$mountpt" ] ; then
    3232            LogIt "Not labeling anything as $label because $mountpt is not a mountpoint"
  • trunk/mondo/mondo/restore-scripts/mondo/make-me-bootable

    r197 r274  
    1919HAVE_ACTIVE="false"
    2020for i in `cat $1 | tr -s '\t' ' ' | cut -d' ' -f1 | grep -v "/dev/fd" | grep -v "none" | grep -v "#"` ; do
    21     mountpt=`cat $1 | grep "$i " | tr -s '\t' ' ' | cut -d' ' -f2`
    22     format=`cat $1 | grep "$i " | tr -s '\t' ' ' | cut -d' ' -f3`
     21    mountpt=`grep "$i " $1 | tr -s '\t' ' ' | cut -d' ' -f2`
     22    format=`grep "$i " $1 | tr -s '\t' ' ' | cut -d' ' -f3`
    2323    drive=`echo $i | sed -e 's/[0-9]*$//' -e 's/\([0-9]\)p$/\1/'`
    2424    partno=`echo $i | sed -e 's/^.*[^0-9]\([0-9]*\)$/\1/'`
  • trunk/mondo/mondo/restore-scripts/mondo/mount-me

    r30 r274  
    1414fi
    1515
    16 paths=`cat $mountlist | grep -v " raid " | grep -v "lvm lvm" | tr -s ' ' ' ' | cut -d' ' -f2 | sort`
     16paths=`grep -v " raid " $mountlist | grep -v "lvm lvm" | tr -s ' ' ' ' | cut -d' ' -f2 | sort`
    1717> $mountlist.sorted
    1818for i in $paths ; do
  • trunk/mondo/mondo/restore-scripts/mondo/restore-bigfiles-from-iso

    r30 r274  
    4141        echo -en "."
    4242        if echo "$slicename" | grep "slice-[0-9]*.00000\.dat" 2> /dev/null; then
    43             CHECKSUM=`cat $slicename | head -n1 | cut -f1`
    44             OUTFNAME=`cat $slicename | head -n1 | cut -f2`
     43            CHECKSUM=`head -n1 $slicename | cut -f1`
     44            OUTFNAME=`head -n1 $slicename | cut -f2`
    4545            OUTFNAME=`echo "$restorepath/$OUTFNAME" | tr -s '/' '/'`
    4646            echo "Now restoring $OUTFNAME"
  • trunk/mondo/mondo/restore-scripts/mondo/stablilo-me

    r30 r274  
    9191
    9292WhatIsFirstDriveCalled() {
    93     cat /tmp/mountlist.txt | cut -d' ' -f1 \
     93    cut -d' ' -f1 /tmp/mountlist.txt \
    9494| sed s/[0-9]// | sed s/[0-9]// \
    9595| sort | uniq | head -n 1
  • trunk/mondo/mondo/restore-scripts/mondo/unmount-me

    r30 r274  
    1717done
    1818
    19 for i in `cat /proc/swaps | cut -d' ' -f1 | grep /dev`; do
     19for i in `cut -d' ' -f1 /proc/swaps | grep /dev`; do
    2020    swapoff $i
    2121done
Note: See TracChangeset for help on using the changeset viewer.