On Thursday, September 15, 2011 09:47:34 AM Michael Mol wrote: > > The main purpose of udev is to populate the /dev-tree. > > The running of scripts based on /dev-tree events should be in a seperate > > tool that starts later in the boot-process. > > I'm not entirely convinced this is the case, because it feels like > some situations like network devices (nbd, iSCSI) or loopback would > require userland tools to bring up once networking is up.
Yes, but the kernel-events referencing those devices won't appear untill after the networking is brought up. The scripts that "udev" starts are run *after* a device-event is created. If the device itself has not been spotted by the kernel (for instance, the networking doesn't exist yet), the event won't be triggered yet. This situation does not require udev to start all these tools when network- devices appear. I hope the following would make my thoughts a bit clearer: 1) kernel boots 2) kernel detects network device and places "network-device-event" in the queue 3) further things happen and kernel places relevant events in the queue (some other events may also already be in the queue before step 2) 4) udev starts and starts processing the queue 5) For each event, udev creates the corresponding device-entry and places action-entries in a queue 6) system-init-scripts mount all local filesystems 7) udev-actions starts (I made up this name) 8) udev-actions processes all the entries in the action-queue >From step 4, udev will keep processing further events it gets, which means that if any action taken by "udev-actions" causes further devices to become available, "udev" will create the device-entries and place the action in the action-queue. If anyone has a setup where /usr can not be mounted easily, it won't work currently either and a init* would be necessary anyway. (Am thinking of NFS, CIFS, iSCSI, NBD, special raid-drivers,.... hosting /usr or other required filesystems) But anyone with a currently working environment should be able to expect a currently working environment. If it fails to boot with only updating versions, it's a regression. And one of the worst kinds of all. -- Joost