#!/bin/bash
# $Id: scsi.agent 269 2004-08-16 13:07:06Z hare $
#
# SCSI hotplug agent for 2.5 kernels
#
#        ACTION=add
#        DEVPATH=devices/scsi0/0:0:0:0
#

: ${ACTION?Bad invocation: \$ACTION is not set}
: ${DEVPATH?Bad invocation: \$DEVPATH is not set}

SYSFS=needed
cd /etc/hotplug
. ./hotplug.functions

case $ACTION in

    add)
	:
        ;;
    
    remove)

        case $DEVPATH in
            /devices/css*)
                hwdown scsi-devpath-${SYSFS}${DEVPATH} -o hotplug
                ;;
        esac
        ;;

    *)

        debug_mesg SCSI $ACTION event not supported
        exit 1
        ;;
    
esac
