diff --git a/include/tests_storage b/include/tests_storage index 16d0a874..cdad2bcb 100644 --- a/include/tests_storage +++ b/include/tests_storage @@ -31,7 +31,7 @@ FOUND=0 logtext "Test: Checking USB storage driver in directory /etc/modprobe.d and configuration file /etc/modprobe.conf" if [ -d /etc/modprobe.d ]; then - FIND=`ls /etc/modprobe.d/* 2>/dev/null` + FIND=`ls /etc/modprobe.d/* 2> /dev/null` if [ ! "${FIND}" = "" ]; then FIND=`grep -r "install usb-storage /bin/true" /etc/modprobe.d/* | grep "usb-storage" | grep -v "#"` FIND2=`egrep -r "^blacklist (usb_storage|usb-storage)" /etc/modprobe.d/*` @@ -71,15 +71,20 @@ FOUND=0 logtext "Test: Checking firewire storage driver in directory /etc/modprobe.d and configuration file /etc/modprobe.conf" if [ -d /etc/modprobe.d ]; then - FIND1=`egrep "blacklist (ohci1394|firewire-ohci)" /etc/modprobe.d/* | grep "ohci" | grep -v "#"` - FIND2=`egrep "install (ohci1394|firewire-ohci) /bin/true" /etc/modprobe.d/* | grep "ohci" | grep -v "#"` - if [ ! "${FIND1}" = "" -o ! "${FIND2}" = "" ]; then - FOUND=1 - logtext "Result: found firewire ohci driver in disabled state" + FIND=`ls /etc/modprobe.d/* 2> /dev/null` + if [ ! "${FIND}" = "" ]; then + FIND1=`egrep "blacklist (ohci1394|firewire-ohci)" /etc/modprobe.d/* | grep "ohci" | grep -v "#"` + FIND2=`egrep "install (ohci1394|firewire-ohci) /bin/true" /etc/modprobe.d/* | grep "ohci" | grep -v "#"` + if [ ! "${FIND1}" = "" -o ! "${FIND2}" = "" ]; then + FOUND=1 + logtext "Result: found firewire ohci driver in disabled state" + fi + else + logtext "Result: skipping /etc/modprobe.d, directory found but no files in it" fi fi if [ -f /etc/modprobe.conf ]; then - FIND1=`egrep -r "blacklist (ohci1394|firewire-ohci)" /etc/modprobe.conf | grep "ohci" | grep -v "#"` + FIND1=`egrep -r "blacklist (ohci1394|firewire-ohci)" /etc/modprobe.conf | grep "ohci" | grep -v "#"` FIND2=`egrep -r "install (ohci1394|firewire-ohci) /bin/true" /etc/modprobe.conf | grep "ohci" | grep -v "#"` if [ ! "${FIND1}" = "" -o ! "${FIND2}" = "" ]; then FOUND=1