From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Wed, 16 Feb 2005 12:37:41 +0000 Subject: Re: [ANNOUNCE] hotplug-ng 001 release Message-Id: <20050216123741.GA4513@vrfy.org> List-Id: References: <20050211004033.GA26624@suse.de> In-Reply-To: <20050211004033.GA26624@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wed, Feb 16, 2005 at 01:51:17PM +0300, Roman Kagan wrote: > Meanwhile let me speculate a bit about another potential use of this > envirnonment variable. E.g. here's a slightly modified /sbin/hotplug ... > It extends the hotplug multiplexor to dispatch the hotplug scripts in > the hotplug.d/bus directory and its subdirectories matching the $MODNAME > (with the bus: prefix stripped). > > The subdirectory names would be shell patterns themselves. (This might > be somewhat counterintuitive because normally you want all names that > match a pattern, but here you want all patterns (at the same time > directory names) that match the $MODNAME.) E.g. if someone wants a > hotplug script to be run only for USB devices with vendor ID 0x1234 and > product ID 0xABCD he would put his script under > /etc/hotplug.d/usb/v1234bABCD\*/. > > This way it can replace that *map thing without the need to start > _every_ hotplug script just to see most of them exit without doing > anything because they don't match the device. I like something like this a lot. > The script above works even with ash from klibc-0.198; it should be > fairly easy to implement the same model in the binary hotplug, provided > fnmatch is added to klibc. Be aware that we need this functionality inside of udev too, cause udev/udevd manages the hotplug events at least on Gentoo, Fedora and SUSE, and the later two can never use the tiny multiplexer, cause these systems do not support installations without udev. And we already have a something like fnmatch in udev, which compiles nicely with klibc. :) It may also solve the current trouble with the udev dev.d/ scripts. We need to execute a tty script to support real serial devices, but surely don't want to fork a useless shell for the hundreds of real ttys. We may even consider to move the dev.d/ scripts over to hotplug.d/ to have only a single source of event handling and device matching. I really like to see all this happen as it seems to make things a whole lot easier than today. Thanks, Kay ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ 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