Skip to contentSkip to conversation

SCSI hotplug on 2.5.50 ....

DISCUSSION David Brownell 1 participant 1 message Nov 29, 2002

lore
Share & tools
lore
#0 lore raw

What should /etc/hotplug/scsi.agent do better than this initial version does? Seems like some of the 'devlabel' or 'usbmount' functionality should layer on top of it...

- Dave

#!/bin/bash
#
# SCSI hotplug agent for 2.5 kernels
#
#
ACTION­d
#
DEVPATHÞvices/scsi0/0:0:0:0
#

cd /etc/hotplug
. hotplug.functions

case $ACTION in

add)

     TYPE=$(cat /sys/$DEVPATH/type)
     case "$TYPE" in
     # 2.5.50 kernel bug: strings end '\n\0'
     Direct-Access*)	mesg "disk at $DEVPATH" ; modprobe sd_mod ;;
     CD-ROM*)		mesg "cdrom at $DEVPATH" ; modprobe sr_mod ;;
     *)			mesg "how to add a $TYPE at $DEVPATH ??" ;;
     esac
     ;;

*)
debug_mesg SCSI $ACTION event not supported
exit 1
;;

esac

-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel