Skip to contentSkip to conversation

Hotplug support for osst

PATCH Willem Riede 2 participants 2 messages Oct 30, 2004

lore
Share & tools
lore
#0 lore raw

/etc/hotplug/scsi.agent states:

# FIXME some tapes use 'osst' not 'st'
1) TYPE=tape ; MODULE=st ;;

I know how to determine when to use osst rather than st, which involves matching vendor and model information.

I propose the following patch:

etc/hotplug/scsi.agent renamed from etc/hotplug/scsi.agent.orig +10 -2
@@ -41,8 +41,16 @@
     case "$TYPE" in
     # 2.5.51 style attributes; <scsi/scsi.h> TYPE_* constants
     0)		TYPE=disk ; MODULE=sd_mod ;;
-    # FIXME some tapes use 'osst' not 'st'
-    1)		TYPE=tape ; MODULE=st ;;
+    # Some tapes use 'osst' not 'st'
+    1)		TYPE=tape ;
+		VENDOR=$(cat /sys/$DEVPATH/vendor) ;
+		MODEL=$(cat /sys/$DEVPATH/model) ;
+		if [ $VENDOR = "OnStream" -a ${MODEL:0:3} != "ADR" ]
+		then
+			MODULE=osst ;
+		else
+			MODULE=st ;
+		fi ;;
     2)		TYPE=printer ;;
     3)		TYPE=processor ;;
     4)		TYPE=worm ; MODULE=sr_mod ;;

Thanks, Willem Riede.

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&opÌk
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 1 line · Willem Riede

+ if [ $VENDOR = "OnStream" -a ${MODEL:0:3} != "ADR" ]

"=" is a bashism. Please use a plain "=".

Signature · 12 lines
Alexander E. Patrakov


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel