Am Freitag, 19. Mai 2006 03:14 schrieb Goswin von Brederlow: > Hendrik Sattler <[EMAIL PROTECTED]> writes: > > Am Donnerstag, 18. Mai 2006 21:53 schrieb Goswin von Brederlow: > >> But how do you detect when there is no device to be found to call the > >> function? > > > > That's of absolutely no interest because in this case, you cannot go on, > > having synchronous events or not. However, you might have alternatives > > for a root partition that are fulfilled with another function call. > > The point is that to keep the goal in mind: you want to achieve something > > e.g. by probing many different possibilities. > > Lets say you want to find a scanner: you probe SCSI busses, spawn a > > thread that test the parallel bus and another one for USB and whatever > > else. You only want to find one. You don't synchronize on any of those > > specific events but on the result: that a scanner is found. > > Sure, you need a timeout, but it is unrelated to a specific probing > > method > > So you mean you register a function for "block device found" and then > scan all the ide, sata, scsi, usb, ... drivers from the initrd and for > every disk and partition the function gets called. When it gets called > with the partition with the right signature (label or uuid for > example) it mounts / and continues. > > Not a function for "scsi disk ID 0 on scsi0 (3ware) found". > > I see what you mean. Keeping the function abstract enough allows > removing a disk and plug it in somewhere else, e.g. change the scsi > ID.
Almost. It can still be "scsi disk ID 0 on scsi0 (3ware) found" but that it a matter of only the script to mount root and /etc/fstab (which also allows for LABEL and UUID, as alternative to the links in /dev created by udev), not the other script that wants root mounted and waits until this is the case. However, I am not sure that this is really done this way, currently. Would be the cleanest approach, though. HS
pgpuHwhMZQpCq.pgp
Description: PGP signature