diff options
-rwxr-xr-x | src/aif-report-issues.sh | 1 | ||||
-rw-r--r-- | src/core/libs/lib-blockdevices-filesystems.sh | 4 | ||||
-rwxr-xr-x | src/core/libs/lib-flowcontrol.sh | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/aif-report-issues.sh b/src/aif-report-issues.sh index 5ed18f4..06be8c8 100755 --- a/src/aif-report-issues.sh +++ b/src/aif-report-issues.sh @@ -31,6 +31,7 @@ then bin=${bin/ /} # for some reason there is a space in the beginning report="$report\n$i $bin" done + shopt -u nullglob fi echo "It can also be useful to upload a list of currently mounted filesystems:" 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 |