#!/bin/sh # # VERSION 0.3 # # Author: Adalbert Prokop # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # This script was originally written to make the Tevion USB Card Reader work # together with Fedora Core 3. # # This card reader uses LUNs 0-3 in the USB->SCSI emulation. # Those LUNs are not scanned by the FC3 kernel by default. It's more a quick # hack, than a good software, but it works fine for me. :) # # tevion by Adalbert Prokop # 10.12.2004 declare -i SCSI_HOST SCSI_CHANNEL SCSI_ID SCSI_LUN SCSI_HOST_PATH="$(ls -d "/sys$DEVPATH/host"*)" SCSI_HOST=${SCSI_HOST_PATH#/sys$DEVPATH/host} SCSI_CHANNEL=0 SCSI_ID=0 # Finaly: add the other three devices with their LUNs! :) for SCSI_LUN in 1 2 3; do echo "scsi add-single-device $SCSI_HOST $SCSI_CHANNEL $SCSI_ID $SCSI_LUN" > /proc/scsi/scsi done