Sorry, didn't read ahead. That seems like it would work, but seems pretty complicated.
Also: Does the daemon need to do anything after the last file system is unmounted and before the system reboots? Remember that it will get little or no warning of the impending shutdown, and since the unmounts are at the very end of shutdown there's very little time. Joe Blount wrote: > As I understand it, what I need to do is copy some code from ctrun, to > make make a middle-man daemon that creates and executes a separate > contract (where the real daemon runs). > Most of the time, the middle man daemon will pass signals on to the real > daemon, and wait for the real daemon to die. (if the real daemon dies, > the middle man will exit, so SMF will restart things) > > In the special shutdown case where the real daemon should not die, the > middle man will send the "shutdown when your filesystems are gone" > signal then exit. > That would make SMF happy (the daemon it knows about is gone), and the > real daemon would be permitted to hang around as long as it needs to. > >