Darren.Reed at Sun.COM wrote: > In reading this and thinking about this problem from a different > angle, it almost seems like we have a new need for a method: > one that can look at the current state of a service and say "no, > you cannot enable me yet" or "yes I can be enabled" > > In the case of NFS, this would allow you to: > - check properties as you've outlined above > - check dfstab to see if anything is active therein > - allow returning an abitrary string to svcadm for display > > I'm not eager to see the same replicated for disable because > more often than not you will want what is required for the enable > to still "be there" when you do the disable. Yes. Disable is usually going to be fine if the service was in the enabled state since enabled will have stricter requirements.
A method as you suggest might be useful in some cases, but not all. Well, I suppose for the problem I'm thinking of, it would also work. The problem is: the service is already enabled an admin changes something in the config to an invalid value I suppose a method to check that the configuration is enableable would then just issue a no and give a diagnosis message. The concern in the problem outlined is that currently a bad configuration could be setup and it wouldn't be detected until a service refresh/restart A method to validate property values might also be useful by itself. Doug