Changeset 2531 in MondoRescue for branches/2.2.9/mindi/analyze-my-lvm


Ignore:
Timestamp:
Jan 8, 2010, 1:58:43 PM (14 years ago)
Author:
Bruno Cornec
Message:

r3749@localhost: bruno | 2010-01-08 12:28:35 +0100

  • Still fixing the same issues on device exclusion and LVM
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/analyze-my-lvm

    r2530 r2531  
    177177
    178178ListLvmDrivesAndPartitions() {
     179    # We get partitions in this loop not devices
    179180    for d in `$LVMCMD vgdisplay -v 2> /dev/null | grep "PV Name" | sed 's/(#)//' | awk '{print $3}'`; do
    180181        # Skip devices excluded, coming from mondoarchive
    181         if [ "$EXCLUDE_DEVS" ] && [ "`echo " $EXCLUDE_DEVS " | grep " $d"`" != "" ]; then
     182        skip=0
     183        if [ "$EXCLUDE_DEVS" ] ; then
     184            for ed in $EXCLUDE_DEVS ; do
     185                if  [ "`echo " $d " | grep " $ed"`" != "" ]; then
     186                    echo "Excluding $d from i-want-my-lvm (due to excluded device $ed)"
     187                    skip=1
     188                    continue
     189                fi
     190            done
     191        fi
     192        if [ $skip -eq 1 ]; then
    182193            continue
    183194        fi
     
    185196        if [ -f /etc/multipath.conf ]; then
    186197            i=`GiveMapperOfdm $d`
    187             if [ "$EXCLUDE_DEVS" ] && [ "`echo " $EXCLUDE_DEVS " | grep " $i"`" != "" ]; then
     198            skip=0
     199            if [ "$EXCLUDE_DEVS" ] ; then
     200                for ed in $EXCLUDE_DEVS ; do
     201                    if  [ "`echo " $i " | grep " $ed"`" != "" ]; then
     202                        echo "Excluding $i from i-want-my-lvm (due to excluded device $ed)"
     203                        skip=1
     204                        continue
     205                    fi
     206                done
     207            fi
     208            if [ $skip -eq 1 ]; then
    188209                continue
    189210            fi
Note: See TracChangeset for help on using the changeset viewer.