Quoth Dick Hoogendijk on Fri, Jun 15, 2007 at 08:59:34PM +0200: > Alan Coopersmith <alan.coopersmith at sun.com> writes: > > For power off it appears to do: > > /* > > * Send SIGPWR signal to the init process to shut down the system. > > */ > > if (kill (1, SIGPWR) == -1) > > uadmin(A_SHUTDOWN, AD_POWEROFF, 0); > > >From man uadmin: > > WARNINGS > On x86 systems, shutting down the system by means of uadmin > does not update the boot archive. Avoid using this command > after manual editing of files such as /etc/system or > driver.conf(4). > > So I guess, init 5 _is_ safer.
Well uadmin() shouldn't destroy any of your data, but the system won't come up cleanly if you've changed boot-archive configuration, which is pretty rare. But note that the code only calls uadmin() if the kill() fails. Though I don't think that kill() is quite correct, since SIGPWR instructs init that the power has failed and the UPS will cut off power soon. David
