Hello community, here is the log from the commit of package scsi checked in at Sat Jun 3 00:59:49 CEST 2006. -------- --- scsi/scsi.changes 2006-04-04 17:11:07.000000000 +0200 +++ scsi/scsi.changes 2006-06-02 15:53:03.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Jun 2 15:52:05 CEST 2006 - hare@suse.de + +- Fixup rescan-scsi-bus.sh to not rely on obsolete /proc/scsi/scsi + interface (176120) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ scsi.spec ++++++ --- /var/tmp/diff_new_pack.BBjPJL/_old 2006-06-03 00:59:41.000000000 +0200 +++ /var/tmp/diff_new_pack.BBjPJL/_new 2006-06-03 00:59:41.000000000 +0200 @@ -22,7 +22,7 @@ Provides: scsiinfo sg_utils scsidev Autoreqprov: on Version: 1.7_2.36_1.19_0.17_0.97 -Release: 6 +Release: 12 Summary: SCSI Tools (Text Mode) Source: scsiinfo-%{sinfover}.tar.gz Patch: scsiinfo-%{sinfover}.diff @@ -310,6 +310,9 @@ %{insserv_cleanup} %changelog -n scsi +* Fri Jun 02 2006 - hare@suse.de +- Fixup rescan-scsi-bus.sh to not rely on obsolete /proc/scsi/scsi + interface (176120) * Tue Apr 04 2006 - hare@suse.de - Added support for RDAC controller. * Fri Feb 24 2006 - garloff@suse.de ++++++ rescan-scsi-bus.sh ++++++ --- scsi/rescan-scsi-bus.sh 2006-01-15 19:06:13.000000000 +0100 +++ scsi/rescan-scsi-bus.sh 2006-06-02 14:41:21.000000000 +0200 @@ -69,8 +69,51 @@ CHANNEL=`printf "%02i" $channel` ID=`printf "%02i" $id` LUN=`printf "%02i" $lun` - grepstr="scsi$host Channel: $CHANNEL Id: $ID Lun: $LUN" - SCSISTR=`cat /proc/scsi/scsi | grep -A$LN -e"$grepstr"` + if [ -d /sys/class/scsi_device ]; then + SCSIPATH="/sys/class/scsi_device/${host}:${channel}:${id}:${lun}" + if [ -d "$SCSIPATH" ] ; then + SCSISTR="Host: scsi${host} Channel: $CHANNEL Id: $ID Lun: $LUN" + if [ "$LN" -gt 0 ] ; then + IVEND=$(cat ${SCSIPATH}/device/vendor) + IPROD=$(cat ${SCSIPATH}/device/model) + IPREV=$(cat ${SCSIPATH}/device/rev) + SCSIDEV=$(printf ' Vendor: %-08s Model: %-16s Rev: %-4s' "$IVEND" "$IPROD" "$IPREV") + SCSISTR="$SCSISTR +$SCSIDEV" + fi + if [ "$LN" -gt 1 ] ; then + ILVL=$(cat ${SCSIPATH}/device/scsi_level) + type=$(cat ${SCSIPATH}/device/type) + case "$type" in + 0) ITYPE="Direct-Access " ;; + 1) ITYPE="Sequential-Access" ;; + 2) ITYPE="Printer " ;; + 3) ITYPE="Processor " ;; + 4) ITYPE="WORM " ;; + 5) ITYPE="CD-ROM " ;; + 6) ITYPE="Scanner " ;; + 7) ITYPE="Optical Device " ;; + 8) ITYPE="Medium Changer " ;; + 9) ITYPE="Communications " ;; + 10) ITYPE="Unknown " ;; + 11) ITYPE="Unknown " ;; + 12) ITYPE="RAID " ;; + 13) ITYPE="Enclosure " ;; + 14) ITYPE="Direct-Access-RBC" ;; + *) ITYPE="Unknown " ;; + esac + SCSITMP=$(printf ' Type: %-16s ANSI SCSI revision: %02d' "$ITYPE" "$((ILVL - 1))") + SCSISTR="$SCSISTR +$SCSITMP" + fi + + else + return 1 + fi + else + grepstr="scsi$host Channel: $CHANNEL Id: $ID Lun: $LUN" + SCSISTR=`cat /proc/scsi/scsi | grep -A$LN -e"$grepstr"` + fi if test -z "$SCSISTR"; then return 1; else return 0; fi } @@ -167,8 +210,8 @@ echo -en "\r\e[A\e[A\e[A${red}REM: " echo "$SCSISTR" | head -n1 echo -e "${norm}\e[B\e[B" - echo "scsi remove-single-device $devnr" >/proc/scsi/scsi - echo "scsi add-single-device $devnr" >/proc/scsi/scsi + echo 1 > /sys/class/scsi_device/${host}:${channel}:${id}:${lun}/device/delete + echo "$channel $id $lun" >/sys/class/scsi_host/host${host}/scan fi printf "\r\x1b[A\x1b[A\x1b[A${yellow}OLD: $norm" testexist @@ -180,7 +223,7 @@ if test -z "$SCSISTR"; then # Device does not exist, try to add printf "\r${green}NEW: $norm" - echo "scsi add-single-device $devnr" >/proc/scsi/scsi + echo "$channel $id $lun" >/sys/class/scsi_host/host${host}/scan testexist if test -z "$SCSISTR"; then # Device not present ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit-help@opensuse.org