Subject: Run a program just before Reboot prompt
To: None <netbsd-help@netbsd.org>
From: Phil Pereira <phil@bsdnexus.com>
List: netbsd-help
Date: 03/25/2005 15:59:41
All,

I am trying to run a UPS shutdown program (that will kill the power to the box) just before the "Press any key to reboot" prompt - is this possible?

I thought about adding the program call to /etc/rc.shutdown, but this would result in the system not shutting down correctly because the hooks wouldn't complete, the UPS would turn off and kill the computer power.

So, any ideas how I can add a call to a program in /usr/pkg/bin just before the system prompts for "Press any key to reboot" - or another appropriate time when the power can be safely pulled from the system?

Thanks

Phil.