From d6a8a3c425755a29863167acbee270628084dd8d Mon Sep 17 00:00:00 2001 From: mboelen Date: Thu, 1 Oct 2015 19:56:39 +0200 Subject: [PATCH] Correct testing for disabled/blacklisted USB storage driver --- include/tests_storage | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/tests_storage b/include/tests_storage index dbae4aca..5d84e118 100644 --- a/include/tests_storage +++ b/include/tests_storage @@ -33,18 +33,18 @@ if [ -d /etc/modprobe.d ]; then FIND=`ls /etc/modprobe.d/* 2> /dev/null` if [ ! "${FIND}" = "" ]; then - FIND=`grep -r "install usb-storage /bin/\(false\|true\)" /etc/modprobe.d/* | grep "usb-storage" | grep -v "#"` + FIND=`egrep -r "install usb-storage /bin/(false|true)" /etc/modprobe.d/* | grep "usb-storage" | grep -v "#"` FIND2=`egrep -r "^blacklist (usb_storage|usb-storage)" /etc/modprobe.d/*` if [ ! "${FIND}" = "" -o ! "${FIND2}" = "" ]; then FOUND=1 - logtext "Result: found usb-storage driver in disabled state" + logtext "Result: found usb-storage driver in disabled state (blacklisted)" fi else logtext "Result: uncommon situation. Found /etc/modprobe.d directory, but no files in it." fi fi if [ -f /etc/modprobe.conf ]; then - FIND=`grep "install usb-storage /bin/\(false\|true\)" /etc/modprobe.conf | grep "usb-storage" | grep -v "#"` + FIND=`egrep "install usb-storage /bin/(false|true)" /etc/modprobe.conf | grep "usb-storage" | grep -v "#"` if [ ! "${FIND}" = "" ]; then FOUND=1 logtext "Result: found usb-storage driver in disabled state"