diff options
Diffstat (limited to 'src/core/libs')
-rw-r--r-- | src/core/libs/lib-blockdevices-filesystems.sh | 4 | ||||
-rwxr-xr-x | src/core/libs/lib-flowcontrol.sh | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index d00ef81..bcde961 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -257,10 +257,11 @@ findblockdevices() { disk=$(basename $devpath) echo -ne "/dev/$disk $1" cd /sys/block/$disk + shopt -s nullglob for part in $disk* do # check if not already assembled to a raid device. TODO: what is the significance of the 5? ASKDEV - if ! grep -q $part /proc/mdstat 2>/dev/null && ! fstype 2>/dev/null </dev/$part | grep -q lvm2 && ! sfdisk -c /dev/$disk $(echo $part | sed -e "s#$disk##g") 2>/dev/null | grep -q '5' + if [ -n "$part" ] && ! grep -q $part /proc/mdstat 2>/dev/null && ! fstype 2>/dev/null </dev/$part | grep -q lvm2 && ! sfdisk -c /dev/$disk $(echo $part | sed -e "s#$disk##g") 2>/dev/null | grep -q '5' then if [ -d $part ] then @@ -268,6 +269,7 @@ findblockdevices() { fi fi done + shopt -u nullglob done # mapped devices for devpath in $(ls /dev/mapper 2>/dev/null | grep -v control) diff --git a/src/core/libs/lib-flowcontrol.sh b/src/core/libs/lib-flowcontrol.sh index b9830b0..4f3bbfa 100755 --- a/src/core/libs/lib-flowcontrol.sh +++ b/src/core/libs/lib-flowcontrol.sh @@ -45,6 +45,7 @@ load_module () module=$(basename "$module") load_${submodule} "$1" "$module" done + shopt -u nullglob fi done |