On Mon, Jun 02, 2008 at 12:40:20PM -0400, James Carlson wrote: > Jordan Brown writes: > > This isn't the first time there's been a service that needs to run > > during shutdown, after other things have been shut down. SunUC's > > automatic mechanisms for installing "single user" patches have roughly > > the same requirement, give or take exactly where during shutdown. (I > > have never looked at that sequence in detail, but I have seen that it > > runs too early in shutdown.) > > That's likely a different case with a different set of issues. For > instance, SunUC would probably be unhappy if /usr and /var were > unmounted before it ran. > > > However, I suspect that for this particular operation (cutting power to > > the UPS) a kernel hook _is_ required. I assume that when you cut power > > to the UPS, pretty much instantly the computer loses power. That means > > it better happen after the final sync, which is down inside the kernel > > inside uadmin(2). (Perhaps others realized this, but I don't see it > > clearly in the messages.) > > Unfortunately, you also have to talk *to* the UPS to get there. It's > not all that simple to do as a kernel service.
Can't svc.startd do this? There's already magic in the do_uadmin() function that calls /usr/sbin/killall, so it should be possible to hook in some magic there. Ceri -- That must be wonderful! I don't understand it at all. -- Moliere -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20080603/969e71ac/attachment.bin>