NWAM Phase 1 introduces a couple of new SMF services and modifies a few others. These new SMF services have dependencies between each other and existing services. When system/manifest-import runs, it doesn't care about the dependencies. Thus, we have a problem because we want one service online before the second one starts..
Couple of things we have tried (let me illustrate with SMF services A and B where B depends on A (in other words, A must start before B)). manifest-import doesn't care if B was imported and started before A. 1. In B's start method, explicitly enable A. If A is already enabled, it does nothing. Otherwise, A is started. This doesn't work (all the time) because if manifest-import hasn't imported A yet, then the enable finds nothing. Two solutions we're looking at: 1. In B's start method, check if A been enabled (it will be if it has been imported). If not, sleep for a while and check again. If A still hasn't been enabled, exit with an error. We don't want to have a loop here for fear that A may have failed and don't want B to keep checking forever. 2. In B's start method, check if A has been enabled. If not, svccfg import A. The issue here it that it may create a race condition where B imports A and manifest-import is also importing A. I don't see any other scripts (in /lib/svc/method) doing such imports, so what would happen here? Are there any controls to make the import operation exclusive? Is there a different solution to the problem of manifest-import respecting service dependencies? Other comments? Thanks, Anurag