Detect lack of CONFIG_SCSI_PROC_FS in ofpath on 2.6 systems
[yaboot.git] / ybin / ofpath
index 6763dfd97e631aff2e8f2a73d1a5039a0e33a3ab..e9c29aaeadeccd4d465e5751d06c884cf8b93f55 100755 (executable)
@@ -187,6 +187,17 @@ scsiinfo()
 {
     ## see if system has scsi at all
     if [ ! -f /proc/scsi/scsi ] ; then
+       local kver="$(uname -r)"
+       case "$kver" in
+           2.5.*|2.6.*)
+               if [ -d /sys/bus/scsi/devices -a \
+                   -n "$(ls /sys/bus/scsi/devices 2>/dev/null)" ] ; then
+                   echo 1>&2 "$PRG: /proc/scsi/scsi does not exist"
+                   echo 1>&2 "$PRG: Make sure you compiled your kernel with CONFIG_SCSI_PROC_FS=n"
+               fi
+               return 1
+               ;;
+       esac
        echo 1>&2 "$PRG: /dev/$DEVNODE: Device not configured"
        return 1
     fi