Fix ofpath for G5 with multiple drives yaboot-1.3.14rc1
authorPaul Nasrat <pnasrat@redhat.com>
Fri, 10 Feb 2006 01:29:18 +0000 (01:29 +0000)
committerPaul Nasrat <pnasrat@redhat.com>
Fri, 10 Feb 2006 01:29:18 +0000 (01:29 +0000)
Fix ofpath for G5 with multiple drives

git-archimport-id: pnasrat@redhat.com/yaboot--devel--1.3--patch-3

ybin/ofpath

index 5cc33f2a481f9b3b90a72621b50914569a8e364d..db9957c72b41c8df563b3a4d189fa6a584ab72fc 100755 (executable)
@@ -298,10 +298,10 @@ scsi_ofpath()
            echo "${DEVICE_PATH##*device-tree}/@$DEVICE_ID:$PARTITION"
            ;;
        ata_k2|sata_svw)
            echo "${DEVICE_PATH##*device-tree}/@$DEVICE_ID:$PARTITION"
            ;;
        ata_k2|sata_svw)
-           HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do
-                       lgrep "$i" "k2-s-ata" ; done)"
+           HOST_LIST="$(for i in `find /proc/device-tree -name compatible ` ; do
+                       lgrep "$i" "k2-sata" ; done | sort)"
            DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
            DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
-           echo "${DEVICE_PATH##*device-tree}/k2-sata@$DEVICE_ID/disk@0:$PARTITION"
+           echo "${DEVICE_PATH##*device-tree}/disk@0:$PARTITION"
            ;;
        *)
            echo 1>&2 "$PRG: Driver: $SCSI_DRIVER is not supported"
            ;;
        *)
            echo 1>&2 "$PRG: Driver: $SCSI_DRIVER is not supported"