Quoth Christine Tran on Thu, Mar 16, 2006 at 04:59:31PM -0500: > David Bustos wrote On 03/15/06 17:48,: > > At the multi-user-server milestone, services which > > milestone/multi-user-server doesn't depend on (directly or indirectly) > > will be disabled. For milestone all, no services are automatically > > disabled. > > OK, so that I'm clear, if I have serviceX which has no dependency and no > dependent, it will be disabled everywhere except in milestone "all"? > I'm infering this from what you said, that services are enabled in a > milestone when it specifies that milestone as a dependent. I get this, > structurally it makes sense to me, but there's something > counter-intuitive. If I am dependent on no-one and no-one is dependent > on me, I should be free as a bird to run (what, you didn't know this is > Crazy Metaphor Day?) as soon as I can. Not complaining, just > anticipating the customer's question.
I think you're equating SMF milestone behavior with runlevels. Solaris 9 would boot into runlevel S (and run the rcS scripts) and then proceed into the default runlevel as set in inittab. For runlevel 3, this meant executing the /etc/rc2.d scripts and then the /etc/rc3.d scripts. (That's right -- the system didn't actually pass through runlevel 2; inittab was set up to simulate it.) Solaris 10 maintains this ordering between the rc scripts through dependencies -- milestone/multi-user-server, which executes the rc3 scripts, depends on multi-user, which depends on single-user. To avoid breaking scripts which were placed after Solaris scripts in rc2, we require that any service which was moved from an rc2 script to an SMF service be started before multi-user, which is done by making multi-user a dependent. Similarly for rcS and rc3. Scripts which were placed to start before Solaris scripts in rc2 are out of luck if the Solaris service has been converted to SMF; it must also be converted to SMF to get the dependencies right. Now there's the problem of implementing "init s". In Solaris 9, init would (try to) stop services started in rc2 and rc3, so that only the services started in rcS were running. Well in SMF this translates into stopping everything except services which single-user depends on (directly or indirectly). So we introduced the svcadm milestone functionality, which init s now uses under the covers. But as Solaris 10 boots, it does not progress through the single-user, multi-user, and multi-user-server milestones; the dependencies take care of the ordering. (The runlevel progresses, for backwards compatibility.) So ordinarily, we boot to the "all" milestone, and services with no dependencies or dependents start right away. You could argue that in Solaris 9 such a service would have been started right away even when booting to a reduced runlevel. But what rc directory would it have been in? That's where the analogy breaks down. This is a new concept, and as such we get to define the behavior, and what's currently there is both the easiest to implement and, we think, the easiest to understand (in the full context of SMF). David