Changeset 274 in MondoRescue for trunk/mondo/mondo/restore-scripts/mondo
- Timestamp:
- Jan 3, 2006, 4:15:54 PM (18 years ago)
- Location:
- trunk/mondo/mondo/restore-scripts/mondo
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/restore-scripts/mondo/compare-me
r30 r274 104 104 padded_bfnum=`printf "%07d" $bf_num` 105 105 slice_fname=`GiveSliceName $bf_num $slice_num` 106 checksum=`c at $slice_fname | cut -f1`107 # finalsize=`c at $slice_fname | cut -f2`108 i=`c at $slice_fname | cut -f3`106 checksum=`cut -f1 $slice_fname` 107 # finalsize=`cut -f2 $slice_fname` 108 i=`cut -f3 $slice_fname` 109 109 outputfile=/mnt/RESTORING/"$i" 110 110 echo -n "$i " … … 164 164 outcome=$? 165 165 retval=$(($retval+$outcome)) 166 cat /tmp/rsm.log | grep -v "ignored"> /tmp/rsm.2.log166 grep -v ignored /tmp/rsm.log > /tmp/rsm.2.log 167 167 if [ "$outcome" -ne "0" ] ; then 168 168 echo -e -n " \r" … … 261 261 fi 262 262 263 cat /tmp/compare-me.log \ 264 | grep -v -x "Files [^:]*:-" \ 263 grep -v -x "Files [^:]*:-" /tmp/compare-me.log \ 265 264 | sort | uniq > /tmp/suspect.files 266 265 -
trunk/mondo/mondo/restore-scripts/mondo/grub-MR
r197 r274 64 64 BOOTPATHNAME="" 65 65 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` 67 67 [ "$bootpart" ] && [ -e "/mnt/RESTORING/$bootpart" ] && break 68 68 done … … 164 164 if echo $bootpart | grep "/md" > /dev/null ; then 165 165 base=`basename $bootpart` 166 line=` cat /proc/mdstat | grep $base| head -n1`166 line=`grep $base /proc/mdstat | head -n1` 167 167 echo "mbrpart was $mbrpart" 168 168 mbrpart=`parted2fdisk -l | grep /dev/ | head -n1 | tr ':' ' ' \ -
trunk/mondo/mondo/restore-scripts/mondo/hack-fstab
r30 r274 30 30 size=`echo "$incoming" | cut -d' ' -f4` 31 31 # 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 ' ' ' '` 33 33 # echo "original_fstab_line = $original_fstab_line" >> /dev/stderr 34 if [ "` cat $old_fstab | grep "LABEL="`" != "" ] ; then34 if [ "`grep "LABEL=" $old_fstab`" != "" ] ; then 35 35 if [ "$format" = "ext2" ] || [ "$format" = "ext3" ] ; then 36 36 device="LABEL=$mountpoint" … … 89 89 col2=`echo "$incoming" | cut -f2` 90 90 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`" 92 92 if [ "`echo "$orig" | grep "LABEL="`" != "" ] ; then 93 93 echo "orig = $orig" >> /dev/stderr -
trunk/mondo/mondo/restore-scripts/mondo/hack-lilo
r30 r274 54 54 newdev=`GetNewFstabMountpoint $dev` 55 55 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` 58 58 newdev="$col1_new" 59 59 if [ ! "$newdev" ] ; then … … 61 61 fi 62 62 fi 63 # old_fstab_line=` cat $new_fstab | grep "$dev"`63 # old_fstab_line=`grep "$dev" $new_fstab` 64 64 [ "$2" = "other" ] || echo -e -n "\t" 65 65 echo -e "$2=$newdev" … … 135 135 ProcessLilo < $old_lilo >> $outfile 136 136 chmod 600 $outfile 137 cat $bootlistfile | sort | uniq >$bootlistfile137 sort -u $bootlistfile -o $bootlistfile 138 138 139 139 #------ disabled 12/10/01 (doesn't do anything anyway *g*) -
trunk/mondo/mondo/restore-scripts/mondo/label-partitions-as-necessary
r30 r274 28 28 mountline=`mount | grep " $label "` 29 29 # mountpt=`echo "$mountline" | cut -d' ' -f1` 30 ! mountpt=` cat $mountlist | grep " $label "| cut -d' ' -f1`30 ! mountpt=`grep " $label " $mountlist | cut -d' ' -f1` 31 31 if [ ! "$mountpt" ] ; then 32 32 LogIt "Not labeling anything as $label because $mountpt is not a mountpoint" -
trunk/mondo/mondo/restore-scripts/mondo/make-me-bootable
r197 r274 19 19 HAVE_ACTIVE="false" 20 20 for 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` 23 23 drive=`echo $i | sed -e 's/[0-9]*$//' -e 's/\([0-9]\)p$/\1/'` 24 24 partno=`echo $i | sed -e 's/^.*[^0-9]\([0-9]*\)$/\1/'` -
trunk/mondo/mondo/restore-scripts/mondo/mount-me
r30 r274 14 14 fi 15 15 16 paths=` cat $mountlist | grep -v " raid "| grep -v "lvm lvm" | tr -s ' ' ' ' | cut -d' ' -f2 | sort`16 paths=`grep -v " raid " $mountlist | grep -v "lvm lvm" | tr -s ' ' ' ' | cut -d' ' -f2 | sort` 17 17 > $mountlist.sorted 18 18 for i in $paths ; do -
trunk/mondo/mondo/restore-scripts/mondo/restore-bigfiles-from-iso
r30 r274 41 41 echo -en "." 42 42 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` 45 45 OUTFNAME=`echo "$restorepath/$OUTFNAME" | tr -s '/' '/'` 46 46 echo "Now restoring $OUTFNAME" -
trunk/mondo/mondo/restore-scripts/mondo/stablilo-me
r30 r274 91 91 92 92 WhatIsFirstDriveCalled() { 93 c at /tmp/mountlist.txt | cut -d' ' -f1\93 cut -d' ' -f1 /tmp/mountlist.txt \ 94 94 | sed s/[0-9]// | sed s/[0-9]// \ 95 95 | sort | uniq | head -n 1 -
trunk/mondo/mondo/restore-scripts/mondo/unmount-me
r30 r274 17 17 done 18 18 19 for i in `c at /proc/swaps | cut -d' ' -f1| grep /dev`; do19 for i in `cut -d' ' -f1 /proc/swaps | grep /dev`; do 20 20 swapoff $i 21 21 done
Note:
See TracChangeset
for help on using the changeset viewer.