Changeset 1314 in MondoRescue
- Timestamp:
- Apr 16, 2007, 3:16:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.2/mondo/src/restore-scripts/mondo/label-partitions-as-necessary
r1295 r1314 7 7 8 8 read_partition_line() { 9 local tmplabel mountpt command format9 local label mountpt command format 10 10 11 if [ "`echo "$1" | grep -E 'LABEL='`" != "" ] ; then 11 label=`echo "$1" | awk '{print $1}' | cut -d'=' -f2` 12 format=`echo "$1" | awk '{print $3}'` 13 14 if [ "`echo "$1" | grep -E 'LABEL='`" != "" ] ; then 12 15 opttun="-L" 13 elif [ "`echo "$1" | grep -E 'UUID='`" != "" ] ; then 16 mountpt=`awk '{print $1,$5}' $mountlist | grep " $label$" | awk '{print $1}'` 17 elif [ "`echo "$1" | grep -E 'UUID='`" != "" ] ; then 14 18 opttun="-U" 19 mountpt=`awk '{print $1,$6}' $mountlist | grep " $label$" | awk '{print $1}'` 15 20 else 16 21 # Nothing to do 17 22 return 18 23 fi 19 24 20 tmp=`echo "$1" | tr -s ' ' '\t' | cut -f1`21 label=`echo "$tmp" | cut -d'=' -f2`22 format=`echo "$1" | tr -s ' ' '\t' | cut -f3`23 mountpt=`grep -w " $label" $mountlist | cut -d' ' -f1`24 25 if [ ! "$mountpt" ] ; then 25 LogIt "Not labeling anything as $label because $mountptis not a mountpoint"26 LogIt "Not labeling anything as ($label) because ($mountpt) is not a mountpoint" 26 27 elif [ ! "$label" ] ; then 27 LogIt "Not labeling $mountpt as anything because $labelis not a label"28 LogIt "Not labeling ($mountpt) as anything because ($label) is not a label" 28 29 else 29 30 if [ "$format" = "ext2" ] || [ "$format" = "ext3" ] ; then
Note:
See TracChangeset
for help on using the changeset viewer.