I have a multi card reader and a cd burner. When the system boots sometimes the cd burner is scsi0 and the card reader is scsi1 ... sometimes it is the other way around.
I have to do a cdrecord -scanbus after boot to see which device is on which address and then I have to
Code:
echo "scsi add-single-device 0 0 0 1" > /cat/proc/scsi/scsi
etc to enable the luns for the last three slots on the card reader.
I would like to create a script that does this automatically at boot time once the burner and card reader are assigned addresses. I considered just writing the script to issue the command both ways, one way throwing the error and the other working... but this does not seem to be "good programming"
Is there a less klunky way to accomplish this?
thanks
ewto