/System/Library/LaunchDaemons
, /Library/LaunchDaemons
, and /Library/StartupItems
are all processed at system startup. There's no specific order to the LaunchDaemons folders -- everything in them becomes eligible to run all at once, only those with <key>RunAtLoad</key><true/>
actually launch immediately. The launchd way of doing things is to fire 'em all off and let them sort out their own dependencies.
StartupItems (if there are any) define their own order. Each StartupItem is a folder that includes the script to run, and a StartupParameters.plist
file that (among other things) can define what the StartupItem provides, and what it requires; they will be ordered so that the item that provides a particular capability run before those that require it.
I'd expect StartupItems to run after RunAtLoad LaunchDaemons, but I don't think that's specified anywhere and I wouldn't count on it.
The items in the three LaunchAgent folders are all loaded when a user logs in (i.e. sometime after system startup). As with LaunchDaemons, there's no particular order, they all become eligible to run at the same time.
Finally, there is no /System/Library/StartupItems
folder in OS X Lion.