Let me try again: > > (Maybe more context or a complete example explaining what the newservice is > intended to do would help.) > > When nwamd is starting, the "certain tasks" can't be performed (called installing Locations). This is copying of configuration files (ipfilter, ipsec, etc) to /etc and since filesystem/usr hasn't started at this point, the filesystem is read-only and the configuration files cannot be copied. So, nwamd cannot perform these tasks from its start method.
Other services (ipfilter, ipsec, etc) are dependent on the new service (network/location). So, our current implementation design is along these lines: network/location is disabled by default, if no Location is installed and if filesystem/usr is online, then install the Locations and start (enable -t) network/location. Then, dependents like ipfilter, ipsec, etc. can start. In this situation, rather than svc.startd, nwamd is the starter of network/location. Our other design goes like this: network/location is dependent on filesystem/usr and is enabled by default. When network/location is started, it triggers nwamd to install the Location (using a new command nwamadm). The call by nwamadm must be synchronous otherwise network/location enters the online state before the location has been installed. This can cause dependents like ipfilter, ipsec to start before configuration files are in place. Currently, nwamadm only makes asynchronous calls via libnwam. It would need to support synchronous calls for this solution to work. Hence, the question. The first design uses nwamd as the starter for network/location. Is this ok? Or, does it constitute hacking the SMF framework to make things work? Hopefully, this is clearer. Thanks Anurag
