From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Sat, 05 Jun 2004 16:05:31 +0000 Subject: Re: Run script when USB scanner unplugged Message-Id: <20040605160531.GA13261@kroah.com> List-Id: References: <40BE3850.8070106@comcast.net> In-Reply-To: <40BE3850.8070106@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Sat, Jun 05, 2004 at 11:01:23AM -0500, Ian Pilcher wrote: > Greg KH wrote: > >On Wed, Jun 02, 2004 at 03:28:00PM -0500, Ian Pilcher wrote: > > > >>Running Fedora Core 2 here. I've found that the hotplug scripts shipped > >>with the distribution do a fine job of setting the permissions when a > >>USB scanner is plugged in *after* a user has logged in. > > > > > >There is no /dev node for a USB scanner anymore, as there is no kernel > >driver for it in 2.6. Do you realize this? Because of this, modifying > >the hotplug scripts will be quite difficult, and udev will know nothing > >about this kind of device, sorry. > > > > /etc/hotplug/usb/libusbscanner, as shipped with Fedora Core 2, already > sets the ownership of the appropriate /proc/bus/usb/... file to the > "console" user. This works fine when a scanner is plugged in *after* > the user has logged on. > > I've hacked /etc/hotplug/usb/libusbscanner to create a symbolic link > from /dev/usb/scanner-%sys%devices%pci%... to that /proc/bus/usb... > file. Um, why? That usbfs file is _not_ a device node. Anyway... > When the USB "insertion" is processed during system boot, the > symlink gets created. Then when a "console" user logs on, PAM follows > the symlink and sets the ownership of the /proc/bus/usb... file > appropriately. > > All I want to do is run a script during the USB "remove" event to get > rid of this symlink. Reading through /etc/hotplug/usb.agent, it looks > like I should be able to put a script in the location specified by the > ${REMOVER} variable, but I've tried this and it never gets executed. > > What do I need to do? I don't know, sorry. Never used the remove stuff myself... Good luck, greg k-h ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ 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