Alan Maguire writes: > i've been working on spec'ing out the delegated restarter > behaviour for the Network Auto-Magic project, and one thing > i was thinking is it'd be nice to be able to add to the reasons > that "svcs -xv" displays - from what i can tell they're > hard-coded in svcs/explain.c. is there a way to augment these > so a delegated restarter can provide an additonal reason?
Why would this be a delegated-restarter-only feature? Unless I'm missing something, this would be a very nice thing to have for ordinary services. The one concern I have is with making it a free-form text field. That's great for administrators and ease of implementation, but what about those who need to script or get programmatic access to the state? One trick I've seen used in other operating systems is to format the field such that it contains a stable identifier plus some application supplied (and probably i18n'd) text, something like this: Cause: SMF-REASON-12345 Network cable on bge0 is unplugged Those doing fancy things with the field can take the stable part and ignore the rest. Humans will ignore the stable part and read the text. (Not sure what administrators might do, though. ;-}) -- James Carlson, Solaris Networking <james.d.carlson at sun.com> Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677