I'm afraid I haven't had the time to test this in my particular application ("works" always being the enemy of "better" :-), but I do heartily endorse the integration of an official "run once" mechanism.
Nicolas Williams wrote: >> Below is a script (tested) that solves the runonce problem. > > Is it worth ARCing and integrating into OpenSolaris? > > I'd place it in /lib/svc/bin as 'runonce'. > > Note that this script depends on ctrun(1), which isn't in /sbin, so > there's no point converting it to be a /sbin/sh script unless we also > have ctrun in /sbin, or convert the whole thing into a C program. > > Nico