On Mon, Jun 23, 2008 at 11:00:54PM -0500, Mike Gerdts wrote: > You could probably work this in as the final action of the start method. > > at now <<EOF > svcadm disable -s $SMF_FMRI > svccfg delete $SMF_FMRI > EOF > > As soon as at(1) has dropped it in the queue, the service will be > online. cron(1M) will then run the the at job to disable and delete > the service.
Better yet, use ctrun(1) to start the deletion in a separate contract, and in the script that deletes the service use svcadm disable followed by svcprop -w -p restarter $SMF_FMRI to wait for the status of the service to change, then svccfg delete it.