From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Fri, 11 Mar 2005 17:32:00 +0000 Subject: Re: New hotplug interface is not working right for me Message-Id: <1110562320.4891.46.camel@localhost.localdomain> List-Id: References: <20050311060405.GA16141@thyrsus.com> In-Reply-To: <20050311060405.GA16141@thyrsus.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, 2005-03-11 at 12:03 -0500, Eric S. Raymond wrote: > Kay Sievers : > > After node creation/removal udev executes the following scripts: > > /etc/dev.d/$DEVNAME/*.dev > > /etc/dev.d/$SUBSYSTEM/*.dev > > /etc/dev.d/default/*.dev > > > > You may place your executable script or a symlink to it as: > > /etc/dev.d/tty/gps.dev > > > > and check for ACTION and DEVNAME values to sort out wrong devices and > > match your action. > > Will gps.dev will be executed on every tty activation, or just > when a gps%e node gets created? Yes, that is right. > If, as I suspect, the answer is "every tty activation", then the > boot-time lag due to virtual consoles that someone pointed out is a > real performance issue -- slowing down boot is very anti-social behavior > which I don't want to contribute to. There is a udev design issue here > which could be addressed in several ways: > > 1. Split up the tty subsystem. Perhaps there should be a defined > subsystem for serial-over-USB devices? Perhaps virtual ttys should > go into a pty subsystem, with only real serial ports in tty? > > Or maybe the right subsystem map would look like this: > > tty -- all tty devices > pty -- virtual consoles and software ttys > usbtty -- hotplug serial-over-USB devices > rstty -- real hardware serial ports This would be a very big change to the kernel just for the sake of a new name. I don't expect something like that to happen. :) > 2. Allow device or subsystem wildcarding in directory names > for finer control of when the scripts activate. Hmm, I'm not sure. I don't like these directories anymore. All the scripts need to check if they are invoked for the right ACTION and the right device, you don't have stuff like sysfs attributes to match against... Here is my number: :) 3. Add a rule file in /etc/udev/rules.d/ and match with that rule against any value that this device event exposes. A successful rule adds the program to a list of programs to be executed after the node is handled. 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