File s390-tools-sles11sp2-lsluns-fix_generate_msg_if_sg_functionality_not_available.patch of Package s390-tools

Description: lsluns: check for required SCSI generic (sg) functionality.
Symptom:     lsluns fails silently on unavailability of sg functionality.
Problem:     lsluns does not check for the availability of sg functionality.
Solution:    Check for the availability of sg functionality else print 
             an error message and exit.
Problem-ID:  75140
 zconf/lsluns |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

--- a/zconf/lsluns
+++ b/zconf/lsluns
@@ -271,12 +271,8 @@ push @port, map { @{$res_hash{$_}} } key
 die "$PROGRAM_NAME: Unable to execute due to missing sg3_utils package. ".
     "Processing stopped.\n" if system("sg_luns -V > /dev/null 2>&1");
-# checking for SCSI gereric kernel module (sg) availability.
-die "$PROGRAM_NAME: Error: SCSI generic kernel module (sg) not loaded.".
-    "Please load sg to use $PROGRAM_NAME.\n"
-    if system("/sbin/lsmod | grep '^sg[[:space:]]' > /dev/null 2>&1");
+die "$PROGRAM_NAME: Error: SCSI generic (sg) functionality is required. ".
+    "Please load/configure sg to use $PROGRAM_NAME.\n" if (! -d "/sys/class/scsi_generic");
 if ($active) {