Hi Srinivas, you might want to use "svcadm enable -s ...". Quoting from svcadm(1M) manual page:
If the -s option is specified, svcadm enables each ser- vice instance and then waits for each service instance to enter the online or degraded state. svcadm will return early if it determines that the service cannot reach these states without administrator intervention. and from the "EXIT STATUS" section: The following exit values are returned: <snip> 3 svcadm determined that a service instance that it was waiting for could not reach the desired state without administrator intervention due to a problem with the service instance itself. 4 svcadm determined that a service instance that it was waiting for could not reach the desired state without administrator intervention due to a problem with the service's dependencies. Hope that helps, Tomas Srinivas Krishnan wrote: > David, > > I try to start the webserver service using a startserv script. The > startserv script contains (svcadm enable > svc:/application/websever:admin-server). If service goes online, echo > $? returns 0. Now even if the service goes into maintenance mode echo $? > returns 0, but in the service log file it says the service exited with > 1. How to get the exit value in the start serv script as i need to > display error message depending on the exit values. > > Thanks > Srinivas > _______________________________________________ > smf-discuss mailing list > smf-discuss at opensolaris.org