From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Fri, 13 Jan 2006 23:53:33 +0000 Subject: Re: cold plugging Message-Id: <20060113235333.GA27893@kroah.com> List-Id: References: <200601131415.30207.treeve@scarlet.be> In-Reply-To: <200601131415.30207.treeve@scarlet.be> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Sat, Jan 14, 2006 at 12:29:45AM +0100, Pozsar Balazs wrote: > On Fri, Jan 13, 2006 at 10:52:03AM -0800, Greg KH wrote: > > On Fri, Jan 13, 2006 at 09:23:51PM +0500, Alexander E. Patrakov wrote: > > > Kay Sievers wrote: > > > > > > >I'm using this: > > > > list=$(echo /sys/bus/*/devices/*/uevent) > > > > list="$list $(echo /sys/class/*/*/uevent)" > > > > list="$list $(echo /sys/block/*/uevent /sys/block/*/*/uevent)" > > > > for i in $list; do > > > > case "$i" in > > > > */device/uevent|*\**) > > > > continue > > > > ;; > > > > */class/mem/*|*/class/tty/*) > > > > first="$first $i" > > > > ;; > > > > */block/md*) > > > > last="$last $i" > > > > ;; > > > > */*) > > > > default="$default $i" > > > > ;; > > > > esac > > > > done > > > > > > > > # trigger the sorted events > > > > for i in $first $default $last; do > > > > echo "add" > "$i" > > > > done > > > > > > > > > > > Why sort the events? They arrive at udevd in random order anyway. > > > > Because many things need /dev/null and the tty device nodes in their > > handlers and scripts, so they need to be created first. > > But the above script does not guarantee that /dev/null will be created > first. It only orders the events, but as events are processed in > parallel, it may well happen that a later event gets processed earlier. Have you seen this happen? thanks, greg k-h ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&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