Hello list. As some of you might have experienced, and as it is frequently subjected, scsi scanners have to be manually added to the scsi subsystem by invoking some scsi-add command as root before talking to the scanner is possible. I am currently experimenting with shell-aliases and overriding paths, to hook this routine into the various sane executables.
Now all of this seems a bit clumsy, and brought me to the idea to simply add scripting hooks into the sane-backend. i would think of about two additional configuration options like "prescan-hook" and "postscan-hook" to be added to the respective backend configuration files /etc/sane.d/abcd.conf. Here paths executables could be set to be hooked before a device is initialized and after is is left alone respectively. This would not only allow a simple solution (workaround?) to the motivating scsi-add issue. These hooks could be used for instance to toggle the power-supply of a scanner, or open/close firewalls, when using a network-device. This could also give a qu^H^Hdirty ad-hoc fix to future driver/udev bugs requiring the user to, say, reload modules or create nodes before/after scanning. I bet there are even better and useful applications for this. Now since the manuals don't mention something like this, I suppose it has not been implemented yet. Would anybody find this useful? Or is there a better/simpler approach for hooking scripts? Is there even a clean solution for the scsi-add thing I have not considered? Does anybody completely dislike the idea of this sort of hooking? Regards Felix