From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Mon, 03 Oct 2005 15:29:26 +0000 Subject: Re: [RFC] coldplug - emit hotplug events from sysfs Message-Id: <20051003152926.GA11975@vrfy.org> List-Id: References: <20051001124943.GA26076@vrfy.org> In-Reply-To: <20051001124943.GA26076@vrfy.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Mon, Oct 03, 2005 at 04:21:49PM +0100, Scott James Remnant wrote: > On Mon, 2005-10-03 at 14:21 +0200, Kay Sievers wrote: > > > To play with it, I use this stupid hack in an early init-script and > > it works without udevstart or any other coldplug logic. > > After mounting tmpfs, creating /dev/null, disabling /sbin/hotplug and > > starting udevd, it creates the tty devices, waits for the events to > > finish, then sends out all remaining events to finish asynchronously: > > ... > > # regenerate events by triggering sysfs > > for i in /sys/class/t*/*/uevent; do echo 1 > $i; done > > # wait for async tty events to finish > > while [ $(cat /proc/*/status 2> /dev/null | grep -c -E '^Name:.udevd?$') -gt 1 ]; do > > sleep 0.1 > > done > > > There's a much better way to do this! If there's a guarantee that a > "write to uevent" will cause a uevent, you can simply use the udev rules > to make sure that udev has fired for each uevent you caused to be > generated. > > No need to grovel for udev processes, etc. I don't see how to use a udev rules to continue the init script which depends on the tty's to be around after that. Care to explain? Kay ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ 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