From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Anderson Date: Mon, 14 Jan 2002 02:58:17 +0000 Subject: possible change to usb.agent Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org I've been trying to get a script to autorun when my USB Fuji 2800 camera is added to the system. I could only get it to work by changing the program flow in "usb.agent". It seemed that "usb.usermap" was only looked at if no other match was found? I used the jPhoto example, except where they used "usb.handmap" I used "usb.usermap". It seemed like the comments indicated it should be in the "usb.usermap" section to me, perhaps I misunderstood the comments? If I'm way off here please let me know so that I can conform to what was expected. I'm giving a user group talk on Monday evening 1/13/02, and I'd like to be give out the correct information. ---------------------------------------------------------------------- I was using the following rpm on Redhat 7.2 and 7.1 systems: ---------------------------------------------------------------------- [root@anthill hotplug]# rpm -qi hotplug Name : hotplug Relocations: (not relocateable) Version : 2001_04_24 Vendor: Red Hat, Inc. Release : 11 Build Date: Mon 27 Aug 2001 12:41:30 PM EDT Install date: Sun 13 Jan 2002 09:31:19 PM EST Build Host: stripples.devel.redhat.com Group : System Environment/Kernel Source RPM: hotplug-2001_04_24-11.src.rpm Size : 97618 License: GPL Packager : Red Hat, Inc. URL : http://linux-hotplug.sourceforge.net/ Summary : A helper application which loads modules for USB devices. Description : The term "hotplugging" refers to the dynamic reconfiguration performed after a device has been attached to a running system. This package contains the application which is called by the kernel when a USB device is added; hotplug then loads the required modules for that device. ---------------------------------------------------------------------- The line I added to /etc/hotplug/usb.usermap ---------------------------------------------------------------------- cam2hd 0x3 0x4cb 0x100 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 ---------------------------------------------------------------------- The diff of my one line change to /etc/hotplug/usb.agent ---------------------------------------------------------------------- [root@anthill hotplug]# diff -c usb.agent.orig usb.agent *** usb.agent.orig Sun Jan 13 21:31:38 2002 --- usb.agent Sun Jan 13 21:31:58 2002 *************** *** 307,313 **** fi # some devices have user-mode drivers (no kernel module, but config) ! if [ "$FOUND" = "false" -a -r $MAP_USERMAP ]; then MODPROBE=: load_drivers usb $MAP_USERMAP "$LABEL" if [ "$DRIVERS" != "" ]; then --- 307,313 ---- fi # some devices have user-mode drivers (no kernel module, but config) ! if [ -r $MAP_USERMAP ]; then MODPROBE=: load_drivers usb $MAP_USERMAP "$LABEL" if [ "$DRIVERS" != "" ]; then [root@anthill hotplug]# -------------------------------------------------------------- Robert E. Anderson email: rea@sr.unh.edu Systems Programmer phone: (603) 862-3489 UNH Research Computing Center fax: (603) 862-1761 -------------------------------------------------------------- _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel